SQL-VB connection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yosh29rs
    New Member
    • Feb 2008
    • 20

    SQL-VB connection

    How do we simply build a connection between a VB project and an SQL server?
  • labmonkey111
    New Member
    • Sep 2008
    • 44

    #2
    I don't think there is anything simple about it. But start with right clicking in the table list window, and select link tables. Then in the File Type list select ODBC Databases. From there it is specific to how you have everything set up, so you may have to figure that part out on your own. Hope this at least gets you started.

    Just realized this is VBA, not VB, forget I said anything.
    Last edited by labmonkey111; Oct 6 '08, 04:51 PM. Reason: Thinking in wrong language

    Comment

    • senlachu
      New Member
      • Dec 2008
      • 1

      #3
      connection

      Hi,
      Please find the code to connect the VB(visual studio 2008) with sql server (2005)


      dim con as sqlconnection
      dim cmd as sqlcomment
      dim ds as datareader

      con= new sqlconnection(" server name ;uid;pwd;databa se")


      where uid= username
      pwd= password


      this is who I have worked and I did not face any problem with this connections .

      Comment

      • lotus18
        Contributor
        • Nov 2007
        • 865

        #4
        Originally posted by yosh29rs
        How do we simply build a connection between a VB project and an SQL server?
        Hi,

        What version of SQL Server are you using?

        For SQL Server 2005, click this link. Hope this helps.

        Rey Sean

        Comment

        Working...