Right, i've checked the spelling and also deleted the user_id as a test but nothing is working, it brings the same error. I even changed the name "password" from the database to password_test as for some reason it gave me problems in my previous website..
My web method again is:-
[WebMethod]
public void CreateUser(string username, string password)
{
string connStr = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=|DataDirectory|/forum.mdb;Persist Security Info=True";
string cmdTxt = "INSERT INTO members([username], [password_test]) Values(" + username + ", " + password + ")";
System.Data.OleDb.OleDbConnection myConn = new System.Data.OleDb.OleDbConnection(connStr);
System.Data.OleDb.OleDbCommand myCmd = new System.Data.OleDb.OleDbCommand(cmdTxt, myConn);
try
{
myConn.Open();
myCmd.ExecuteNonQuery();
}
finally
{
}
if (myConn.State == System.Data.ConnectionState.Open)
myConn.Close();
myConn.Dispose();
myCmd.Dispose();
}
The code of the website is:-
protected void Button1_Click(object sender, EventArgs e)
{
try
{
localhost.Service myws = new localhost.Service();myws.CreateUser("TEST", "TEST");
}
finally
{
}
}
Is there a specific namespace that is needed of something?