Hello,
I do not use Gambas for a long time so please apologize if I am doing a
newbie mistake.
I am trying to build a simple test app to insert into a mysql table.
The relevant code:
PUBLIC SUB Button1_Click()
DIM res AS Result
DIM sql AS String
DIM name AS String
IF TextBox1.Text = ""
Message.Warning("Please provide a customer name")
RETURN
END IF
sql = "INSERT INTO customer VALUES(name), ('" & TextBox1.Text & "')"
Message.Info("Inserting")
res = mDatabase.conn.Exec(sql)
END
However when I check the table contents after a single insert:
mysql> select * from customer;
+-------+
| name |
+-------+
| |
| mokar |
+-------+
2 rows in set (0.00 sec)
What am I doing wrong to get that second record ?
Thanks
--
João Luís Marques Pinto
GetDeb Project Manager
http://www.getdeb.net
http://blog.getdeb.net
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user