Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem deleting VFP records
Message
From
08/02/2005 09:43:16
Eugenio Casal
Futura Tecnologia Informação Consult Ltd
São Paulo, Brazil
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Problem deleting VFP records
Miscellaneous
Thread ID:
00984725
Message ID:
00984725
Views:
52
Hi Kevin,

I´m trying to use MM.Net with VFP databases.

I´ve created the DataAccessOleDb class for each BizzObj following the directions at "Creating Custom Data Access Classes".

Then I modified the generated class adding the Update and Delete commands that were missing.

The update is working but I got the following error message when I try to delete a record: "Command contains unrecognized phrase/keyword."

I´ve also tried with an Access MDB database and the error is
"Syntax error (missing operator) in query expression 'id_teste = ??@id_testeid_testeid_teste'."

The OleDBDataAdapter UpdateCommand and DeleteCommand are configured as follows:
	// 
	// oleDbUpdateCommand1
	// 
	this.oleDbUpdateCommand1.CommandText = "UPDATE texto WHERE id_texto=? SET texto=?, id_public=?";
	this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("?id_texto", 

System.Data.OleDb.OleDbType.Integer, 0, "id_texto"));
	this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("?texto", 

System.Data.OleDb.OleDbType.VarChar, 2147483647, "texto"));
	this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("?id_public", 

System.Data.OleDb.OleDbType.Integer, 0, "id_public"));
	// 
	// oleDbDeleteCommand1
	// 
	this.oleDbDeleteCommand1.CommandText = "DELETE FROM texto WHERE id_texto=?";
	this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("?id_texto", 

System.Data.OleDb.OleDbType.Integer, 0, "id_texto"));
I'd be glad if you point me what´s wrong here.

Thanks in advance.

Eugênio
Next
Reply
Map
View

Click here to load this message in the networking platform