| | |
SQL Connection Strings
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 7
Reputation:
Solved Threads: 0
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!
[ 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!
![]() |
Similar Threads
- Connection Strings slowing me down (ASP.NET)
- SQL Data into Textbox or Listbox (C#)
- load sql data into asp.net table (ASP.NET)
- How to connect in sql "server"? (Visual Basic 4 / 5 / 6)
- SQL express on a remote machine (VB.NET)
- Connection string (VB.NET)
- MSSQL connection strings (MS SQL)
- SQL Server 2000 and VB 6 (Visual Basic 4 / 5 / 6)
- VB and MS-sql 2000 data navigation (Visual Basic 4 / 5 / 6)
- sql server connection (ASP)
Other Threads in the ASP.NET Forum
- Previous Thread: Using Hidden Variables in ASP.NET
- Next Thread: How can I get the value of xsi:type value?
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances application asp asp.net beginner box browser businesslogiclayer button c# cac checkbox child class compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form gridview gudi iis image javascript list listbox menu mouse mssql nameisnotdeclared news novell numerical opera order parent problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security select serializesmo.table sessionvariables silverlight smoobjects software sql sql-server ssl tracking treeview typeof validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xsl





