Hi,
I am trying to connecting Access DataBase to C#,
my data base hase 3 table.
in c# when I configure data adapter and run
query, there is no problem and application run correctly. but when I trying to use 2 or 3 table from this data base
and when I finish this configuration and run the application and when run this line:
I get below error:
"Object reference not set to an instance of an object.".
I attach my program.
thanks
I am trying to connecting Access DataBase to C#,
my data base hase 3 table.
in c# when I configure data adapter and run
Code:
SELECT account.* FROM account
Code:
SELECT account.ID, account.name, account.family, fish.bankname AS Expr2, fish.accountid, fish.fishid, bank.banknumber AS Expr3,
bank.bankname AS Expr1, bank.bankid AS Expr4
FROM ((account INNER JOIN
fish ON account.ID = fish.accountid) INNER JOIN
bank ON fish.bankname = bank.bankname)
Code:
"oleDbDataAdapter1.InsertCommand.CommandText = "INSERT INTO account(name,family) VALUES ('" + nameTextBox.Text + "','" + familyTextBox.Text + "')"; "
"Object reference not set to an instance of an object.".
I attach my program.
thanks
Comment