Results 1 to 2 of 2

Thread: Cant figure out problem...

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2003
    Posts
    1

    Cant figure out problem...

    Everything looks fine to me, however, it continuously pops up with errors, tried a few different ways of doing it. Basically trying to get a textbox to write to a db off a website. It keeps popping up an illegal exception error about initialisizing the jet.4.0 driver. Any help would be appreciated.


    Dim strSQL As String

    Dim myConnection As New System.Data.OleDb.OleDbConnection( _
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\AquacultureDB.mdb;") <--Error here so it says


    strSQL = "Insert INTO Aquaculture (Facility Name, Facility Location) VALUES ('" & TextBox1.Text & "','" & TextBox2.Text & "');"
    myConnection.Open()
    myConnection.Close()

  2. #2
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    This is the connect string generated by the IDE in a test project I have, which works:

    Code:
            Me.OleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\temp\foo.mdb;" & _
            "Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";J" & _
            "et OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5" & _
            ";Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB" & _
            ":Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create " & _
            "System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Loca" & _
            "le on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP" & _
            "=False"
    ...not to say you couldn't shorten it up a bit...

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