sql server - SQL DataReader in IronPython -


Please help me read just one record from MS SQL table.
I have tried to do this in the next way (IRAPA 2.6 RC1):

  CMD = SQL Commands ("Select from my selection", CN) dr = cmd.ExecuteReader ()  

After this I have all the tables in Dr.! But only one record is needed (more accurate: the table is read once)


Sorry!
I was wrong!
I have forgotten two other commands in my program:
Table = []
For the line in Dr.: table.append (line)
So this is Dr. Turned out to be equal. Read ()! ...

Use to limit one (random) records.

  cmd = SqlCommand ("myTable to SELECT TOP 1 *", cn) DR = cmd.ExecuteReader ()  

Usually when in a record Takes interest, then he is interested in specific records, for example a record with ID = 42

The first record will be withdrawn in the 1st order, the engine can choose to access the table.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -