Jump to content
Xtreme .Net Talk

mrdutchie

Avatar/Signature
  • Posts

    80
  • Joined

  • Last visited

Everything posted by mrdutchie

  1. It's working now :) 1 field was set a Required... missed that one a couple of times. Thanks for your help
  2. Tried it, but it's failing on oledb_connect if I leave that to connection1 then it looks like Dim command As New OleDb.OleDbCommand With command .Parameters.Add("@company1", "Test") .CommandText = "Insert into Companyinformation (company1) values (@company1)" .Connection = connection1 End With connection1.Open() command.ExecuteNonQuery() connection1.Close() I need to have the open and Close statement in it But still getting the same error. Also tried to put the .Add on a different row
  3. Hello, I am having the same trouble to write something in a Access file. I am getting this error An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll I created a connection exactly the same as stated above. My access file contains 2 tables 1. Companyinformation 2. Configuration within the Table Companyinformation Table I have 5 Fields ( company1,company2,company3,company4,company5) I want to add "Hello" into the company1 field. And this is my procedure Public Sub write_info() Dim command As New OleDbCommand With command '.CommandText = "Insert into TableNAME (company1) values (" & txtcity.Text & ")" .CommandText = "Insert into Companyinformation (company1) values ('Hello')" .Connection = connection1 End With connection1.Open() command.ExecuteNonQuery() connection1.Close() End Sub What am I missing? Thanks so much
×
×
  • Create New...