Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why can't i see all the records in table when opened
Message
De
30/08/2004 14:49:38
 
 
À
30/08/2004 14:38:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxExpress
Divers
Thread ID:
00937689
Message ID:
00937763
Vues:
6
Hello Ken,
I am using Visual Basic to add records to the table ocdata.dbf

I am using the recordset.addnew and recordset.updates
's' is the variable i am using to add all the text content of a page and save to the table using recorset object.

*************Code************************
'Getting new ID
Dim maxno As Long
Dim newno As Long
Set rstemp = New ADODB.Recordset
rstemp.CursorLocation = adUseClient
rstemp.LockType = adLockOptimistic
rstemp.Open "Select ID from ocrdata order by ID", oconn, adOpenDynamic, , adCmdText

If rstemp.BOF = True Then
newno = 1
Else
rstemp.MoveLast
maxno = rstemp!id

If maxno = 0 Then
newno = 1
Else
newno = maxno + 1
End If
End If
rstemp.Close

rsocr.AddNew
rsocr!id = newno
If Item2 <> "" Then
rsocr!tiffile = Trim(FItem2)
End If
If s <> "" Then
rsocr!ocdata = Trim(s)
End If
rsocr!created_dt = Date
rsocr.Update
rsocr.Close
Set rsocr = Nothing
FItem2 = Null
Poss2 = Null
s = Null
**************************************************
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform