Hello,
I am a newbie, and would like to know how to get data entered from a
form on my web site(aspx) into a 4D Database (6.0.6). The page is done
in C#, but I dont know how to insert the data thats been entered on the
form.
I am running Win2000 spk4 with 'odbc for 4D Server' on the
webserver, not '4D ODBC', 4D Server 6.0.6. I know I am making comm with
the 4D server, I can see odbc come up in the server window. I am
trying to just get a name in the employee's table, recieve the
following error:
ERROR [42000] [Simba][Simba ODBC Driver]Syntax Error. ERROR [42000]
[Simba][Simba ODBC Driver]INSERT INTO << ???
>>[(EMLOYEES)](EmployeeName) VALUES('joe')
Here's the code, some of it's been deleted for easier viewing, but I
believe this is the guts:
using System;
using System.Data;
using System.Data.Odbc;
using System.Web;
using System.Web.Mail;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class order : Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(IsPostBack)
{
//Insert data into db
string connS = "DSN=name;Uid=id;PWD=pwd;";
OdbcConnection odbcConn = new OdbcConnection(connS);
string insertQuery = "INSERT INTO [(EMLOYEES)](EmployeeName)
VALUES('joe')";
OdbcCommand odbcCmd = new OdbcCommand(insertQuery, odbcConn);
odbcConn.Open();
odbcCmd.ExecuteNonQuery();
odbcConn.Close();
Response.Write("<h3>Check to see if order is in database. This will
be removed later</h3>.");


|