Two things:

change this:
f=New FolderItem("ivae.rdb")
to
f = GetFolderItem("ivae.rdb")

and then change this:

if not f.Exists then
to
if (db.Connect = false) then

the most important thing in your code is that db.Connect is missed.

---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/



On Apr 7, 2006, at 5:27 PM, Rafael Vallejo wrote:

What can be wrong with this?? rs is always NIL and got a NilObject erron on the line: while not rs.EOF

To test this work create a Window add a list box named ListBox1 and add the following code to a PushButton

 dim d as REALSQLDatabase
 dim f as FolderItem
 dim rs as RecordSet
 f=New FolderItem("ivae.rdb")
 d=New REALSQLDatabase
 d.DatabaseFile=f
 if not f.Exists then
MsgBox "Error while trying to open ivao local database, reinstal IVAE and try again"
   Quit
 end if
 rs=d.SQLSelect("SELECT * FROM firs")
 if not d.Error then
   while not rs.EOF
     ListBox1.AddRow rs.IdxField(1).StringValue
     rs.MoveNext
   wend
   rs.Close
 else
   MsgBox "Error "
 end if
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to