CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2001
    Location
    MH, India
    Posts
    10

    Connect SQL Server on Net Through offline VB exe

    Hi All,

    Can i use a Standard Exe to connect to a SQLServer database on Internet.

    The connection string that works with ASP does not work with the exe.




  2. #2
    Join Date
    Oct 2001
    Posts
    16

    Re: Connect SQL Server on Net Through offline VB exe

    of course, you can connect to SQL server. You have to give five inputs to the connection string.
    1. Provider Name (SQLOLEDB for SQL Server)
    2. Data Source (IP Address of the System, where your database is present. ex.214.22.23.22)
    3. Username (Username of your database)
    4. Password(Password of your database)
    5. Database Name

    ex.
    create a connection object (conn)
    conn.connectionstring = "Provider=SQLOLEDB;Data Source=214.22.23.22;uid=xyz;pwd=xyz;DataBase=ABC"
    conn.open



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

Featured