Additional DB connection?
Last Post 10/13/2015 11:05 AM by Joseph Craig. 1 Replies.
Author Messages
Cindy Rentas
Posts:


--
10/13/2015 8:17 AM  
I am fairly new to DNN and I have an instance installed on my DEV server. I am needing to connect to our old as400 database to insert Customer Comments into a table that is accessed outside of DNN (for now). What would be the easiest way to connect to the database to add those comments?
I have a customer comments module that I am building to collect the information but now I am to the point of needing to know how to connect for the insert. Is it possible, and maybe easier, to use a stored procedure to insert the data? I have stored procedures already in place in another database that connects to the database as well as code (the old site is in asp pages using vbscript).
In summary, I am taking all of the company's old websites and redoing them to use DNN instead of the old asp pages they currently are running on.
Any suggestions would be most appreciated!
Thanks in advance!
Joseph Craig
DNN MVP
Posts:11667


--
10/13/2015 11:05 AM  
I think that you are on the right track.

So, just write DNN code to connect to and run the stored procedures.

You probably want to add the connection properties to the external database as a connection string in the DNN web.config.

In your code, just create a connection and use the appropriate methods to pass the data and run the stored procedures. Since you already have them, just use them.

Is that enough?

Joe Craig, Patapsco Research Group
Complete DNN Support


---