Documentation - Read ( retrieve ) a single row from a Sql table 
Author Message
 Documentation - Read ( retrieve ) a single row from a Sql table

First of all -  anyone know any good books or websites on getting started from basics -  I can write other languages but VB seems so different - gotta do so much more

Immediate Question -  how do I retrive just one record from a value i put in   -    i can populate ( fill ) the entire dataset but I just want to entre an A/c code for example and retrieve -  using SQL Server

Thanks in advance

Pete



Tue, 01 Nov 2005 15:50:51 GMT  
 Documentation - Read ( retrieve ) a single row from a Sql table

Quote:
>-----Original Message-----
>First of all -  anyone know any good books or websites

on getting started from basics -  I can write other
languages but VB seems so different - gotta do so much
more
Quote:

>Immediate Question -  how do I retrive just one record

from a value i put in   -    i can populate ( fill ) the
entire dataset but I just want to entre an A/c code for
example and retrieve -  using SQL Server

Quote:

>Thanks in advance

>Pete

You could use the ExecuteReader method of a command
object and retrieve the record:
dim dr as system.data.datarow
dim rdrAccount as system.data.sqlclient.sqldatareader
cnNorthwind.open
rdrAccount = cmdGetAccount.ExecuteReader()
with rdrAccount
   while .Read
       console.writeline .getstring(0) & ....
   end while
end with


Tue, 01 Nov 2005 16:11:34 GMT  
 Documentation - Read ( retrieve ) a single row from a Sql table
Thanks

will try that - make sense


Quote:

> >-----Original Message-----
> >First of all -  anyone know any good books or websites
> on getting started from basics -  I can write other
> languages but VB seems so different - gotta do so much
> more

> >Immediate Question -  how do I retrive just one record
> from a value i put in   -    i can populate ( fill ) the
> entire dataset but I just want to entre an A/c code for
> example and retrieve -  using SQL Server

> >Thanks in advance

> >Pete

> You could use the ExecuteReader method of a command
> object and retrieve the record:
> dim dr as system.data.datarow
> dim rdrAccount as system.data.sqlclient.sqldatareader
> cnNorthwind.open
> rdrAccount = cmdGetAccount.ExecuteReader()
> with rdrAccount
>    while .Read
>        console.writeline .getstring(0) & ....
>    end while
> end with



Tue, 01 Nov 2005 17:55:51 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to read Access Table row by row?

2. Select single row in table

3. Looking for advice: Retrieving large number of rows from SQL, to a web client

4. Looking for advice: Retrieving large number of rows from SQL, to a web client

5. Looking for advice: Retrieving large number of rows from SQL, to a web client

6. Single-row refresh operation returned multiple row

7. Looking for advice: Retrieving large number of rows from SQL, to a web client

8. Looking for advice: Retrieving large number of rows from SQL, to a web client

9. SQL - multiple recordsets and a single table questions

10. Retrieve Row Index from a Row Object

11. Cannot delete rows in SQL attached table

12. Retrieving table names via SQL

 

 
Powered by phpBB® Forum Software