CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2000
    Location
    Puerto Rico, UAS
    Posts
    4

    Remote DB ConnectionString

    I use this ASP code to insert values on a web DB.

    <%Set AdoConn = Server.CreateObject ("ADODB.Connection")
    AdoConn.Provider = "Microsoft.Jet.OLEDB.4.0"
    AdoConn.ConnectionString = "Data Source=" & Server.MapPath ("/cgi-bin/MyDataBase.mdb")
    AdoConn.Open

    SQL = "INSERT INTO MyTable (date,title) VALUES (#" & date() & "#,'" & AnyTextVar & "')"

    AdoConn.execute(SQL) %>

    But I want to create a Remote (client) Application in VB, to acomplish this task, and I don't know how to translate this instructions to an ADO Connection String.
    This server is a free hosting sevice, and I don't have to use a DNS less connection too... so it gets more complex because of that.

    If you know how to translate this to an ADO ConnectionString Please Help!
    Thanks!
    =ED=


    =EDGARDO=
    Univ. Of Puerto Rico

  2. #2
    Guest

    Re: Remote DB ConnectionString

    Hello,

    Open vb standard exe project add one component with the name Microsoft ADO Control 6.0.

    paste the control on your form and move to its properties.

    in General Tab you will get one option use Connection String.
    Click on Build Button. select the desidered provider for your database and say ok to complete.
    select the text available just below the use connection string.
    paste the text in front of your code e.g.

    Conn.Open = "Select Text"
    Set rs = Conn.execute(SQL)


    Hope this will help you if not the reply me at

    [email protected]

    i'll tell you another way to do this.


    Bye

    Vivek


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