Thursday, March 17, 2011

Using Oracle for gridview functions.

I use ODP.NET for my oracle access and I've had problems using it in my Visual Studio projects, and using the built in functions with the gridview object.

1. Create a connection in the server explorer using ODP.NET for the connection.

2. In the gridview, use that connection to connect to the database. Your table must have a primary key in order for the editing functions to kick in. The primary key must be listed in the gridview.

3. You can have the steps build the update, delete sqls. You need to edit them in the source view. You need to keep the """ in the source. You cannot substitute double quotes for the "&quote;". Replace the ? of the generated strings with ":CAPPEDNAME". That is how MS tools like to pass the data and it uses the internals of oracle. That should be it.