Dear Mr Texter,
I read your mail. Your suggested code snippet has been tried with
With objAcess
.AddNew
!Name = txtArray1(0).Text
!Address = txtArray1(1).Text
!City = txtArray(2).Text
.Update
End With
Unfortunately, although the programme compiles and runs. In setting a new
record, the SQL server returns an error from the server stating it cannot
update the record.
In the Visual Basic 6 Application Wizard, .AddNew by itself appears for a
SQL server DSN. It seems to work fine by itself. Books on beginning Visual
basic also seem to state that this works as well.
I am not sure how to diagnose this error. I amnot sure whether my approach
is right to set ADO from the programme DSN. In Mr. Williams book, he
mentions using adLockOptimistic, adOpenKeyset for a MTS .dll. Applying this
to my smaller programme, I checked that the ADO was set as this, but it
still would not take in a new recordset.
As I am connecting by a TCP/IP transport protocol, I am beginning to think
it's either permissions not being set properly on the newly created
database or simply that my home server is running too slow. However, as I
am new to this, I cannot be sure.
I am going to try a string SQL list where I would set the a SQL statement
in a text box to insert just to check.
Thank you for your kind thoughts.
Richard Wang