Results 1 to 2 of 2

Thread: public connection

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    public connection

    I put this on the module;

    Public mypath = Application.StartupPath & "\mydb.mdb"
    Public mypassword = ""
    Public conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mypath & ";Jet OLEDBatabase Password=" & mypassword)
    Public cmd As OleDbCommand

    But I encounter this errors;
    Type 'OleDbConnection' is not defined.
    Type 'OleDbCommand' is not defined.

    what's wrong with this code? What's the best thing to do?

  2. #2
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552
    imports system.data.oledb???

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