Results 1 to 3 of 3

Thread: Sql Server

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2002
    Location
    INDIA
    Posts
    169

    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

  2. #2
    Member
    Join Date
    Aug 2001
    Location
    Eugene, Oregon
    Posts
    41
    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.

  3. #3
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    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
    Code:
    If Question = Incomplete Then
       AnswerNextOne
    Else
       ReplyIfKnown
    End If
    cu Swatty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width