Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems ADO
Message
De
28/11/1998 03:35:33
 
 
À
25/11/1998 19:56:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
00161280
Message ID:
00162105
Vues:
30
>>I want to place file's in memo's
>>I am using ADO
>>
>>ADO give a probleem with memo larger then 255
>
>I only use ADO on Web applications but have
>found that using variables and then doing
>updates eliminates many ADO problems.
>
>In other works, don't go from one table to
>another table directly. Use a variable between
>them.


This is the problem
Hop you can help me

Example



*** Setting up Connection

*** Remote connection
connectionstring = "Provider=MS Remote;"
connectionstring = connectionstring + "Remote Server=http://192.182.122.5;"
connectionstring = connectionstring + "DSN=RelaAdo;uid=;pwd="


*** Direct connection
connectionstring = "DSN=RelaADO;uid=;pwd="

lConnection = CreateObject("adodb.connection")
lConnection.Open(connectionstring)


*** Setting up RecordSet
RecordSet = CreateObject("adodb.recordset")
*RecordSet.cursorlocation = 3
*RecordSet.cursortype = 3
*RecordSet.locktype = 3
*** This one is working fine
lSql = "Select * from update"
Recordset.open(lSql,lConnection,3,3)
Recordset.movefirst
DO WHILE !RecordSet.eof

** Note field modfile is a (Memo Binaire)
** Same problem with normal meo
a = RecordSet.fields('Modfile').value
** a is a array (because binaire memo)
** Store in arr as string in b
b = ''
FOR i = 1 TO ALEN(a)
b = b + CHR(a[i])
NEXT
? b

RecordSet.fields('Modfile').value = CREATEBINARY(b)

recordset.Update()
* Recordset.updatebatch(1)
* Recordset.updatebatch(2)
* Recordset.updatebatch(3)

RecordSet.movenext
ENDDO
Recordset.Close
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform