Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Data Bases > ODBC for 4D
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 153 of 224
Post > Topic >>

ODBC for 4D

by "jreckers@[EMAIL PROTECTED] " <jreckers@[EMAIL PROTECTED] > Oct 3, 2005 at 08:40 PM

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>.");
 




 2 Posts in Topic:
ODBC for 4D
"jreckers@[EMAIL PRO  2005-10-03 20:40:35 
Re: ODBC for 4D
"Fetch, Rover, Fetch  2005-10-04 07:53:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 5 19:15:03 CDT 2008.