locked
Insert session data into Oracle DB RRS feed

  • Question

  • User369646136 posted

    Hi,

    I'm using ASP.NET C# with the v3.5 framework, and need to grab data from the session and insert it into an Oracle database. I can connect to the database and manually insert data from a couple of controls I created. However, I have an application with multiple forms that stores data in the session as the user navigates between the forms. The form information is stored in DataTables, with a separate DataTable for each form. I have an idea of how to retrieve the data, but was wondering if I have to code queries to map each field in the database to the fields in the forms? Or is there a way to "give" the database the information from the DataTable and have it insert each of the values?

    Thanks 

    Thursday, January 20, 2011 11:22 AM

Answers

  • User269602965 posted

    ODP.NET is way faster than OLEDB or ODBC 

    for C#.NET and VB.NET database calls. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 23, 2011 3:03 PM

All replies

  • User269602965 posted

    either way, you will have to write one or more database INSERT statements. 

     

     

    Thursday, January 20, 2011 8:07 PM
  • User369646136 posted

    Right. I'll also need to do a query after the initial insert as the PK of the first table is a FK in others. Will there be any issues with doing this? Do I need to create a stored procedure somewhere to handle the communication?

    Friday, January 21, 2011 2:29 PM
  • User269602965 posted

    You can do it with PL/SQL (aka stored procedure)

    or code behind form/web page with C# or VB.NET and ODP.NET.

    I have found the coding for passing variables, etc. to the PL/SQL stored procedure,

    is just about as much coding as the SQL call from C# or VB.NET,

    so I just do it all from C# or VB.NET code behind form with ODP.NET and OracleDataAccess.dll client.

     

    Friday, January 21, 2011 4:06 PM
  • User369646136 posted

    Thanks for the reply. I'm using C#, but have been connecting to the database with OleDb. Should I connect with another method? 

    Friday, January 21, 2011 4:42 PM
  • User269602965 posted

    ODP.NET is way faster than OLEDB or ODBC 

    for C#.NET and VB.NET database calls. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 23, 2011 3:03 PM