Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172

    Quickie on sqlite

    Hi all,

    I am trying to get user input from input boxes and pass them into an sql database created using the sqlite plugin. I have tried every different syntax I can find to get the data into the database and have failed miserably. When I change the code to place real text in as opposed to the contents of the identifiers, it works.

    Here is the code, if anyone can help... The database is created already...

    --GET USER INPUTS#
    Member_num = Input.GetText ("Input1");
    first_name = Input.GetText ("Input2");
    last_name = Input.GetText ("Input3");

    --this works - proves that input boxes are working and data is being stored in variables..uncomment to use
    --Debug.ShowWindow(true);
    --Debug.Print(Member_num..' '..first_name..' '..last_name);

    --OPEN HANDLE TO DATABASE AND ADD RECORD FROM FORM
    --db = SQLite.Open("retain\\databases\\retain.db");
    --SQLite.Query(db,"insert into MEMBERS values 'Member_num','first_name','last_name'");

    --SQLite.Close(db);

    -----------------------------------------------------code ends

    Thanks, guys

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Give this a try...

    SQLite.Query(db,"insert into Members values('" .. Member_num .."', '".. first_name .."', '".. last_name .."')");

  3. #3
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172
    Thanks Worm!

    It would appear that you are the man! I have a lot of learning to do on this project - both in AMS scripting and SQL, but with your help and the help of others on this forum, I'm sure I'll be flying along and helping others here before I know it.

    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts