djgalaxy2002 wrote:

> 
> can anyone fix my code so it will insert data to my sql server plz
> 
> MyDB1.QueryOne('INSERT ALS_signup INTO (username, password, mailadres) 
> VALUES ('''+ LabeledEdit1.Text +'''  '''+ LabeledEdit2.Text +'''  '''+ 
> LabeledEdit3.Text +'''');
> 

Try

MyDB1.QueryOne('INSERT INTO ALS_signup (username, password, mailadres)
VALUES ('''+ LabeledEdit1.Text +''','''+ LabeledEdit2.Text +''','''+
LabeledEdit3.Text +'''');

Reverse "ALS_signup INTO" to read "INTO ALS_signup"
Also, you need commas between your data values, not spaces.
And, ensure your textboxes don't have ' chars in them.

So finally, your query needs to look something like this:

INSERT INTO ALS_signup (username, password, mailadres)
VALUES ('my_username','my_password','my_emailaddress')


HTH

Brad


-------------------------------------------------------
Home: http://groups.yahoo.com/group/delphi-programming/
Remove: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-programming/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to