-
Sql Server
hi,
I have been using MS ACCESS since I started working in VB. But now I am just starting with SQL SERVER(Desktop edition).
I would like to know how do I select a recordset in sqlserver as I did in MS ACCESS??
eg in Access I used
dim rs as adodb.recordset
dim str as string
set rs a= new adodb.recordset
str="select * from table1"
rs.open str,cn........ etc etc
if rs.recordcount>0 then
.
.
.
.end if
I want to know how do I do the same thing but with a table from SQL SERVER
-
For the most part, you would use the same code as you did when getting data from access. The "select" query sample you have below should work the same in Access and SQL Server.
-
This must work on sqlserver also.
You have to be sure though the connection object is filled correctly. If so it should work on SQL-Server