N
Nick Gilbert
Hi,
I'm trying to call a query I have in my access database from .NET. The
query is called "UpdateAddress".
So I'm calling it like this:
cmd = new OleDbCommand();
cmd.Connection = this.Connection;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new OleDbParameter("Town",OleDbType.Integer)).Value =
town;
cmd.ExecuteNonQuery();
The problem is, the query doesn't seem to care about the name of the
parameter. I can change the word "Town" to be "foobar" and it still
updates the town with no errors. The problem comes when I add lots of
extra fields to update - without names working it just creates a mess.
Does Access not support named parameters like SQL Server does? How else
can I reliably pass 10 paramenters to an Access query from .NET?
Thanks,
Nick...
I'm trying to call a query I have in my access database from .NET. The
query is called "UpdateAddress".
So I'm calling it like this:
cmd = new OleDbCommand();
cmd.Connection = this.Connection;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new OleDbParameter("Town",OleDbType.Integer)).Value =
town;
cmd.ExecuteNonQuery();
The problem is, the query doesn't seem to care about the name of the
parameter. I can change the word "Town" to be "foobar" and it still
updates the town with no errors. The problem comes when I add lots of
extra fields to update - without names working it just creates a mess.
Does Access not support named parameters like SQL Server does? How else
can I reliably pass 10 paramenters to an Access query from .NET?
Thanks,
Nick...