| | |
Problem connecting to the database after changing the database server
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2005
Posts: 7
Reputation:
Solved Threads: 0
The configuration in our setup is one Web Server and one database server running SQL Server. With the current connection string it works. Recently we moved the database server to another machine with a different ip but with the same name. We used the name and not the ip in the connect string. We did not change the connection string. But when we restarted the web server the connection held and the old program worked without changing anything in the code. Is it necessary that everytime we change the database server the web server has to be rebooted. What is the reason for this behavior? Is there a better way to do it rather than start the web server again?
sounds like a DNS conflict. Do you have two machines named like :billybob (10.1.1.5)
and :billybob (10.1.1.6) with just differing IPs on the same network?
this is a big bad no-no if you do. you should be able to connect to a port on the new
system by using the IP in place of the name string like so:
http://billybob:6060 {which one of the above is it?} or better yet: http://10.1.1.6:6060 hey Im DNS and I can tell!
:mrgreen:
and :billybob (10.1.1.6) with just differing IPs on the same network?
this is a big bad no-no if you do. you should be able to connect to a port on the new
system by using the IP in place of the name string like so:
http://billybob:6060 {which one of the above is it?} or better yet: http://10.1.1.6:6060 hey Im DNS and I can tell!
:mrgreen:
I used up all my money on you baby...
... and I want it BACK.
... and I want it BACK.
•
•
Join Date: Jan 2005
Posts: 7
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by Cain
sounds like a DNS conflict. Do you have two machines named like :billybob (10.1.1.5)
and :billybob (10.1.1.6) with just differing IPs on the same network?
this is a big bad no-no if you do. you should be able to connect to a port on the new
system by using the IP in place of the name string like so:
http://billybob:6060 {which one of the above is it?} or better yet: http://10.1.1.6:6060 hey Im DNS and I can tell!
:mrgreen:
Something like this depending on your database name and location:
OleDbConnection conn;
OleDbCommand comm;
OleDbDataReader dr;
conn = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\\db1.mdb");
comm = new OleDbCommand("Select * from Table1",conn);
conn.Open();
conn.Close();
OleDbConnection conn;
OleDbCommand comm;
OleDbDataReader dr;
conn = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\\db1.mdb");
comm = new OleDbCommand("Select * from Table1",conn);
conn.Open();
conn.Close();
•
•
Join Date: Jun 2009
Posts: 1
Reputation:
Solved Threads: 0
i transfer my database access to sql server then problem is that
using system.data.oledb; write in access code then
using system.data.sqlclient write in sql server then
problem is that i can't write the using System.Data.SqlClient because inassembly i can add referrence.hoe i add the erence in that.
using system.data.oledb; write in access code then
using system.data.sqlclient write in sql server then
problem is that i can't write the using System.Data.SqlClient because inassembly i can add referrence.hoe i add the erence in that.
![]() |
Similar Threads
- database copying from local to server (MS SQL)
- database connection for sql server 5.0 and vb.net (VB.NET)
- Database connectivity for sql server express edition 2005 (ASP.NET)
- connecting database (PHP)
- Problem in connecting to database MySql (PHP)
- Problem connecting to SQL Server Express (C#)
- Please help me in connecting JSP to MySql (JSP)
Other Threads in the ASP.NET Forum
- Previous Thread: ScriptManagerProxy fun days.
- Next Thread: how to do it with iTextSharp.dll
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox class click commonfunctions compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dropdownlist dropdownmenu dynamic edit embeddingactivexcontrol expose findcontrol flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list login menu microsoft mono mssql multistepregistration nameisnotdeclared numerical objects order panelmasterpagebuttoncontrols problem ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql sqlserver2005 ssl suse textbox tracking unauthorized validation vb.net video virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment webservice wizard xml youareanotmemberofthedebuggerusers





