Hi all,
I am having my first go at databases, have been playing with Knoda for a
few days now and not got very far, although am learning a lot about how
databases work in general.
I want to have a form and write data from a form to table; I have set up
a very basic test table called People which has three fields: ID, which
is auto increment, Name which is text and Telephone which is text. (All
very Mickey Mouse for the moment.) I have then made a little form with
two lineeditfields and one button. The lineeditfields are called
NameInputField and TelephoneInputField.
I clicked on the button I placed on the form, and clicked on "On Click"
which opened up the little edit box and - with some help from my brother
who's done lots of SQL - I put the following:
INSERT INTO People (Name,Telephone) VALUES (NameInputField,
TelephoneInputField)
Now, I have seen a reference to SQL in the help files saying you have to
use double quotation marks, so I tried this:
INSERT INTO "People" ("Name","Telephone") VALUES ("NameInputField",
"TelephoneInputField")
I also tried single quotation marks, and only put the quotation marks as
so: ("Name,Telephone").
In all instances I get this error:
Line 1: Invalid Syntax (<string>, line 1) and it opens up the edit box
with the SQL in it...
It's flummoxed my brother as well (who is in a different country and
trying to debug via Yahoo), so we must be missing some fundamental point
here. I'd be very grateful for a point in the right direction/
Cheers,
Rob.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Hk-classes-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss