connection to sql server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samycbe
    New Member
    • Feb 2007
    • 83

    #1

    connection to sql server

    dear friends,
    i want to connect vb with sql server database. i am not having the rights to create dsn. how can i? please help me.

    i connected with access by the following method

    Set cn = New ADODB.Connectio n
    cn.Provider = "Microsoft.JET. OLEDB.4.0"
    cn.ConnectionSt ring = "d:\vb projects\a.mdb"
    cn.Open

    please help me.......

    samy
  • ansumansahu
    New Member
    • Mar 2007
    • 149

    #2
    Originally posted by samycbe
    dear friends,
    i want to connect vb with sql server database. i am not having the rights to create dsn. how can i? please help me.

    i connected with access by the following method

    Set cn = New ADODB.Connectio n
    cn.Provider = "Microsoft.JET. OLEDB.4.0"
    cn.ConnectionSt ring = "d:\vb projects\a.mdb"
    cn.Open

    please help me.......

    samy
    Do you need to create a connection through DSN. You can use a DSN less connection.

    Check this link out

    http://www.freevbcode. com/ShowCode.Asp?ID =1257

    thanks
    ansuman

    Comment

    • Dököll
      Recognized Expert Top Contributor
      • Nov 2006
      • 2379

      #3
      Originally posted by samycbe
      dear friends,
      i want to connect vb with sql server database. i am not having the rights to create dsn. how can i? please help me.

      i connected with access by the following method

      Set cn = New ADODB.Connectio n
      cn.Provider = "Microsoft.JET. OLEDB.4.0"
      cn.ConnectionSt ring = "d:\vb projects\a.mdb"
      cn.Open

      please help me.......

      samy
      Take ansumansahu's advice. Also, take comfort in the fact that you can add DSN connection/access through your Data Source Admin (Control Panel + Admin Tools)...See if this works well :-)

      Comment

      • samycbe
        New Member
        • Feb 2007
        • 83

        #4
        I can't use DSN. Because i dont have access of DSN craetion. Please help me the code for connecting the sql server database

        please help me

        samy

        Comment

        • vijaydiwakar
          Contributor
          • Feb 2007
          • 579

          #5
          Originally posted by samycbe
          dear friends,
          i want to connect vb with sql server database. i am not having the rights to create dsn. how can i? please help me.

          i connected with access by the following method

          Set cn = New ADODB.Connectio n
          cn.Provider = "Microsoft.JET. OLEDB.4.0"
          cn.ConnectionSt ring = "d:\vb projects\a.mdb"
          cn.Open

          please help me.......

          samy
          try to make ur all programms DSN less as these are very comfertable
          use ADODC ctrl drop it on ur form right click on it click on properties and set the connection to use sqlserver then after finishing u'll get a connection string there copy and paste it as
          Conn.open <ur coppied connection string here >
          try it
          good luck

          Comment

          Working...