Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why can't i see all the records in table when opened
Message
From
30/08/2004 14:49:38
 
 
To
30/08/2004 14:38:20
General information
Forum:
Visual FoxPro
Category:
Visual FoxExpress
Miscellaneous
Thread ID:
00937689
Message ID:
00937763
Views:
7
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
**************************************************
Previous
Reply
Map
View

Click here to load this message in the networking platform