SQL Connection Strings

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2008
Posts: 7
Reputation: Missouri_Mule is an unknown quantity at this point 
Solved Threads: 0
Missouri_Mule Missouri_Mule is offline Offline
Newbie Poster

SQL Connection Strings

 
0
  #1
Oct 3rd, 2008
I have an existing connection string in my web.config file. I just added some code from another web developer into my website. Along with that I added a new ObjectDataSource control and configured it to look for the existing ConectionString which IS NOT an OleDbConnection, by using the following code.

[ Line 16: public static List<Users> GetUsers()
Line 17: {
Line 18: using (OleDbConnection connection = new OleDbConnection (ConfigurationManager.ConnectionStrings["ASPNETDB22"].ConnectionString))
Line 19: { ]

Can anyone tell me how I can change the above code to use a DataSource connectionString ?
[ <add name="ASPNETDB22" connectionString="Data Source=p3swhsql-v12.shr.phx3.secureserver.net; Initial Catalog=ASPNETDB22; ]

I am new to all of this stuff, especially SQL.

I am trying to set up a login page for my website since the ASP.Net Web Site Administration tool doesn't work on a remote site. I have managed to get the Login to accept user names etc... But I still cannot access the UserAdmin.aspx page because of this error.

Question#2

How or where in the code do I configure the postback to send an email to myself so I can approve or disapprove a user?


Thanks in advance!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC