Results 1 to 2 of 2

Thread: connection string help

  1. #1
    niddu
    Guest

    connection string help

    i try to make a vb.net application but i've some problem with the connection string.. i don't understand some things: i don't have a sql server and i use access, how is the connection string for this kind of db?

    this is the error: find a null value instead of an istance of an object...

    the code:


    Dim strconn As String = "Provider=Microsoft.Jet.OLEDB.4.0; Password=""; Data Source= c:\learningvbdata\ProvaDati.mdb"
    Dim objcon As OleDbConnection
    objcon.ConnectionString = strconn
    objcon.Open()

    ??????

  2. #2
    Hyperactive Member Bananafish's Avatar
    Join Date
    Jan 2001
    Posts
    394
    I think its because you never declared an instance of the oleDbConnection object

    VB Code:
    1. Dim objcon As New OleDbConnection

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