system.data.ado, Access, parameterized commands

SMILING4EVER222

New Member
Is it possible to use the following code (which uses system.data.sql [SQL Server]) on an Access database, or do I have to generate the entire SQL string and just execute that against the database?<BR><BR>Thanks in advance.<BR><BR>Pete<BR><BR><BR>Code in question below.....(I know its not complete, just cut and pasted a little bit to get the idea).<BR><BR>String insertCmd = "insert into Authors values (@Id, @LName, @FName, @Phone, @Address, @City, @State, @Zip, @Contract)";<BR><BR>SQLCommand myCommand = new SQLCommand(insertCmd, myConnection);<BR><BR>myCommand.Parameters.Add(new SQLParameter("@Id", SQLDataType.VarChar, 11));<BR>myCommand.Parameters["@Id"].Value = http://aspmessageboard.com/archive/index.php/au_id.Value;<BR>
 
Back
Top