Hi All.

I've very slowly been getting on learning about RealSQLdatabase use, and I've 
gotten a little farther 
than before.  However, i need a little help.

Some of these questions are probably silly.  I apologize in advance, but I'm 
one of these people who 
needs to know the 'why's of things.

Here is my code:

=============================================================
  Dim db as REALSQLdatabase   'this is the name of the database
  Dim f as FolderItem                'this is telling the system that the 
database is going to be in my folder
  f=GetFolderItem("security")     'look in the folder the program is in for the 
folderitem...
  if f.Exists = false then             'if it isn't there, then 
    f=New FolderItem("security")   'make it
  else
    MsgBox "Item already Exists"   'let them know it doesn't exist
    pushcreatedatabase.Enabled=false   'disable the button...
    Quit                                         'for now, end... until I 
figure this out.
  end if
  
  db=New REALSQLdatabase       'i want a new real sql database
  db.databaseFile=f                     'the name is going to be whatever I 
passed into "f"
  If db.CreateDatabaseFile then  'if I create the database file, put in...
    db.SQLExecute("create table users (username char, password char, priority 
char)")
    db.Commit                             'sql command saying "do it..."
    MsgBox "Database Successfully Created!" 'let the user know it is done.
    pushcreatedatabase.Enabled=false   'the database can only be created one 
time...so i know I have 
to check if the database exists already.
  else
    MsgBox "Database not created"  'the database was not created... for some 
reason
  end if
  ===========================================================

My question is: now that I have created the database, and checked that indeed 
the table now exists 
within the database, when I try to add a user by clicking the adduser button 
(which has the insert into 
table code:)

db = new realsqldatabase
f=getfolderitem("security")
db.databasefile=f
if db.connect then
db.sqlexecute ("Insert into users (username,password,priority) Values 
"(editfield1.text','editfield2.text',',popgroup)")
db.commit

nothing is added to my database.  

Any ideas?

Sincerely,

_______________________________________________
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