Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2004
    Posts
    10

    Unanswered: Accessing SQL Server with VB6

    I need to write a VB app (VB6) to access and manipulate data within a MS SQL Sever 2000 database. I have experience doing this with MS Access. Is it much different/more difficult to do this with SQL Server?

    Thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Kingston, Ontario
    Posts
    106
    Nothing to it! Just change your connection string to something like...

    Code:
    Driver={SQL Server};Database=MyDB;UID=MyName;PWD=MyPwd;Server=MyServer
    Likely won't need to change anything else.

  3. #3
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    There are some differences in SQL format, though. The SQL delimiter for dates is the single apostrophe ('); Access uses the hash mark "#"

    Also, if you've been using SQL functions within any of your queries, you may need to chenge them to T-SQL equivalents.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  4. #4
    Join Date
    Aug 2003
    Location
    Kingston, Ontario
    Posts
    106
    True. As well, Access 97 (or rather Jet 3.5) used the asterisk (*) as its wildcard character. That changed to the percent sign (%) in Jet 4.0.

  5. #5
    Join Date
    Apr 2004
    Posts
    10
    Hey guys,

    Thanks for the input. I just wanted to make sure that I wasn't signing up for anything too tricky.

    Thanks for all the help

  6. #6
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    At first it wouldn't seem that way
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

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