|
-
Oct 24th, 1999, 10:28 PM
#1
Thread Starter
Addicted Member
Can anyone tell me the best way to check via an sql if a record exists on my database and to create it if it doesnt? I do
datax.recordsource = sql but then when I test for EOF or Refresh I get an error if its not there ? Help! If its not there I need to create a new record - thanks
-
Oct 25th, 1999, 12:41 AM
#2
Addicted Member
Try it,
Data1.DatabaseName = "d:\db1.mdb"
Data1.RecordSource = "SELECT * FROM table1 WHERE id=3"
Data1.Refresh
if Data1.Recordset.RecordCount=0 then
...
else
...
endif
------------------
smalig
[email protected]
smalig.tripod.com
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
|