On Oct 04, 2006, at 4:43 PM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote:

Hi All.

I tried the last suggestion that was given, and it doesn't work. However, when I use static text, there is an entry no problem. Which kinda says I'm doing the database creation correctly. When I add a
user by changing the insert comment, here is my code:

=============================

  dim db as REALSQLDatabase
  dim f as FolderItem
  db = new realsqldatabase
  f=getfolderitem("security")
  db.databasefile=f
  if db.connect then
db.sqlexecute ("Insert into users (username,password,priority) Values "_
    +"('Fred Flintstone','Wilma','Gold')")
    db.commit
  end if
=========================

When I add the user via editfields, this is the code:

=========================

  dim db as REALSQLDatabase
  dim f as FolderItem
  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
  end if

=======================

Help?
what values are in the editfields ?

And this is still incorrect

db.sqlexecute ("Insert into users (username,password,priority) Values " +"(editfield1.text+','+editfield2.text+','+popgroup)")

You're missing quotes at the very least +"(editfield1 should be +"('editfield1

db.sqlexecute ("Insert into users (username,password,priority) Values " +"('editfield1.text+','+editfield2.text+','+popgroup)")

if you check db.error in the debugger you'd see you are probably getting an error right before you do the commit
_______________________________________________
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