Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem using UDL with ADO
Message
 
À
13/08/2001 20:26:59
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00542607
Message ID:
00543584
Vues:
13
>Hi,
>
>My UDL code shown below using VFP OLEDB driver
>
>[oledb]
>Provider=VFPOLEDB.1;Data Source=D:\WINPROG\TEST;Mode=ReadWrite|Share Deny None;Password="";Collating Sequence=MACHINE
>
>I still can't get the code below to work. Please advise
>
>
>>That code looks fine to me, and in fact, I just tested something very similar and it all works just fine (Delete and AddNew). What does your UDL look like? Are you using the ODBC driver, and what does your connection string look like?
>>
>>
>>>Hi,
>>>
>>>I am using VB6 with SP5 on Win2k with SP2 using ADO 2.6
>>>I am using UDL method to access my dbf file using the
>>>code below
>>>
>>> Set cn = New ADODB.Connection
>>> Set rs = New ADODB.Recordset
>>>
>>> cn.CursorLocation = adUseClient
>>> cn.Open "File Name=d:\winprog\test\outlet1.udl"
>>> rs.Open "outlet1.dbf", cn, adOpenDynamic, adLockOptimistic, adCmdTable
>>>
>>> rs.MoveFirst
>>> rs.Delete <------ this line give the error below
>>>
>>>Run-time error -2147467887(80040e21)
>>>Multi-set operation generated errors. Check each status value.
>>>
>>>Even using AddNew method also give the same problem.
>>>I refer to use the UDL method as it give me flexiblity
>>>
>>>Please advise and help me on the problem above

I tried to answer your question yesterday but I see nothing got posted!

1. Can you get a connection and view data on a form using your code?

I see you are using OLEDB. You might try the ODBC driver and code as required.

The error you stated is one that occurs when an attempt is made to add too many characters into a field. Example:

Field length = 10
User enters 12 characrers and attempts to save the record.

This problem can be resolved with maxlength, but the problem you have described is different.

Tom
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform