I can not INSERT into Access95 using ADO.net and VB.NET 
Author Message
 I can not INSERT into Access95 using ADO.net and VB.NET

Hi,

        Eventhough I can connect and read records from the access95 database,
I can not insert
        or update database. What could be wrong? I am using
        AddressBookAdapter.InsertCommand.ExecuteNonQuery() to insert into
database. There is no password and user id is Admin.
        The following is connectin string:

        Me.AddressBookConnection.ConnectionString = "Jet OLEDB:Global Partial
Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
        "ocking Mode=0;Jet OLEDB:Database Password=;Data
Source=""C:\H\db1.mdb"";Passwo" & _
        "rd=;Jet OLEDB:Engine Type=4;Jet OLEDB:Global Bulk
Transactions=1;Provider=""Micro" & _
        "soft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet
OLEDB:SFP=False;Extended Prop" & _
        "erties=;Mode=Share Deny None;Jet OLEDB:New Database
Password=;Jet OLEDB:Create S" & _
        "ystem Database=False;Jet OLEDB:Don't Copy Locale on
Compact=False;Jet OLEDB:Comp" & _
        "act Without Replica Repair=False;User ID=Admin;Jet
OLEDB:Encrypt Database=False"

        'Create the SQL query to insert a row
        AddressBookAdapter.InsertCommand.CommandText = _
        "INSERT INTO addresses(Id, firstname, " & _
        "lastnamed) " & _
        "VALUES('" & txtId.Text & "' , " & _
        "'" & txtFirst.Text & "' , " & _
        "'" & txtLast.Text & "')"

        ' Send Query
        AddressBookAdapter.InsertCommand.ExecuteNonQuery()

Thanks,
Hamid



Wed, 07 Dec 2005 05:08:29 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. INSERT into access database using vb.net/ado.net..problem

2. ADO.NET with ASP.NET using VB.NET

3. what create table using ADO.NET to VB.NET

4. Using VB.Net, ADO.Net and Access

5. Fatal Error, using VB .NET + ADO .NET

6. Insert using ADO.NET

7. insert into using ado.net

8. Find good book about using CR.NET with VS.NET and .NET Framework

9. Insert graphic in document using VB.NET

10. My Vb.Net Apps will not run on other machine's with .Net Framework installed

11. Insert text into Word XP using VB.Net?

12. ADO.Net to fetch ActiveDirectory this function bugs in Asp.net but works in Vb.n

 

 
Powered by phpBB® Forum Software