|
-
Nov 22nd, 2000, 11:03 PM
#1
Thread Starter
Member
Hi,
I dunno what is wrong with this problem. I wrote a simple VB Program accessing to Access 97 database. This problem only happen if i save the table fields with an empty textbox field(I set the fields to Allow Zero Length to True)I use Microsoft Jet for the connection string. Below is my coding..
Set DBConnect = New ADODB.Connection
With DBConnect
.CursorLocation = adUseServer
.ConnectionString = cntstring
.Open
End With
With rsTest
.Open "CompanyProfile", DBConnect, adOpenDynamic, adLockOptimistic
.AddNew
.Fields("cst_City") = Text1.Text
.Fields("cst_State") = Text1.Text
.Update
.Close
End With
When I run through this code, an error will occur displaying "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". I change the cursor location to adUserClient and everthing works fine! If I don't change my cursorlocation, using adUseServer... i change the coding to ......
.Fields("cst_City") = Text1.Text & ""
.Fields("cst_State") = Text1.Text & ""
It will save the information!! This is really weird.. and making me crazy..
Anyone has any ideas... please advice.
Thanks..
Thomas
[Edited by tomtan on 11-23-2000 at 12:15 AM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|