.NET Class and reading 1 record in SQL
Somewhat new to SQL and processing loops. I have a non-keyed file and I want to get the next record in sequence .. grab data needed and update it as used. This class is called from a GUI interface so I only need to grab the NEXT record each time......... how??
gollnick
Re: .NET Class and reading 1 record in SQL
What database? What constitutes the next record, are they ordered somehow?
Re: .NET Class and reading 1 record in SQL
Sorry.. SQL table.... BingoCardStack sequential by serial number of card.
GUI interface askes for next card in order to create card for printing. Record is marked as "used" (no problem there) but I only want 1 record.. I think it's datareader but looking for an example
gollnick
Re: .NET Class and reading 1 record in SQL
Show your sql statement and elaborate more on the record you want.
Re: .NET Class and reading 1 record in SQL
That's the point .. I have no statement. That is what I/m looking for.
My GUI interface calls a dataaccess class
I want to do a select * to my bingocardstack file
I then want to do an executereader
I then want to read 1 record and fill a dataset to return to my GUI interface
I then want to close the reader and the connection
Just not sure of the correct syntex
gollnick
Re: .NET Class and reading 1 record in SQL
Well there are tons of examples for that.
Are you familiar with data manipulation?
If not, please do a little reading and you will probably get the solution in a couple of minutes.
Here is a very basic example (i always keep the sp's,queries in my database but anayway...)
http://www.startvbdotnet.com/ado/sqlserver.aspx