Sorry here it is.
using System;
using System.Data;
using System.Data.OleDb;
public class customertbl
{
static void Main()
{
string strConn = @"Provider=VFPOLEDB;Data source=C:\Program Files\Microsoft Visual FoxPro 9\Samples\Data\testdata.dbc;";
string strQuery = "INSERT INTO customer (cust_id, company, contact) VALUES ('SAMAHN', 'SKAHN REST', 'Sam Ahn')";
OleDbConnection cConnect = new OleDbConnection(strConn);
cConnect.Open();
OleDbCommand cCmd = new OleDbCommand(strQuery, cConnect);
OleDbDataReader cRdr = cCmd.ExecuteNonQuery();
cRdr.Close();
cConnect.Close();
}
}
>>I'm trying to insert a record into customer table (foxpro).
>>
>>I'm using ...ExecuteNonQuery();
>>
>>My insert statment looks like this:
>>sqlCom = "INSERT INTO customer (cust_id, company, contact) VALUES ('SAMAHN', 'SKAHN REST', 'Sam Ahn')"
>>
>>
>>The error I keep getting is:
>>"Cannot implicitly convert type 'int' to 'System.Data.OleDb.OleDbDataReader'
>>
>>What does it not like?
>>
>>TIA.
>
>Sam,
>You have to post more of the code, like where you create the connection to the database/table.
>
>Einar
The American Republic will endure, until politicians realize they can bribe the people with their own money.
- Alexis de Tocqueville
No man’s life, liberty, or property is safe while the legislature is in session.
– Mark Twain (1866)