Results 1 to 2 of 2

Thread: How to Connection Database through Data Source (ODBC)

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Location
    Imphal
    Posts
    5

    How to Connection Database through Data Source (ODBC)

    I create a DSN connection through Data Source (ODBC). How to use the DSN in VB Project. I use one in my previous project but the database is MS Access. This time I'm using SQL Server 2000 as database. Please Help
    Attached Files Attached Files

  2. #2

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Location
    Imphal
    Posts
    5

    Re: How to Connection Database through Data Source (ODBC)

    I use the following code
    <code> Dim con AS NEW Connection </code>
    <code> conStr = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=DataServer" </code>
    <code> con.ConnectionString = conStr </code>

    Here "DataServer" is the DSN name I have created in Data source.

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