Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
dot net sql connection
Kemal AL GAZZAH
September 08, 2011
I have a dot net 2.0 application connecting to a sql server data base
The string connection is stored in web.config.
The application connects without any problem to the sql server data base when both the IIS server and the data base server are in the same machine
It also works fine in debugging mode using Visual Studio 2008 when IIS and sql are in the same or in different machines
BUT THE ONLY ISSUE is that it fails to connect to the sql server if IIS and sql server are in two different machines which are in the same LAN , I can ping to the DB server from the IIS server and VICE VERSA
Any idea to fix this issue ?
Posted Date: September 08, 2011 Points: 20
I am not that much of experience in this issue.
please check your sql server name or database. or
create a .ini file in your project.On that .ini file give a server name, database name ,username and password .
To call that ini file in your project and paste that .ini file in your debug folder and use debug folder to another system and run the application.
Regards, Lakshmi Naraayanan.S
Posted Date: September 09, 2011 Points: 20
Check the Connection String in Web.Config..
Thanks & Regards,
Posted Date: October 27, 2011 Points: 20
<add key="DSV" value="server=Servername;UID=username;PWD=password;DataBase=Databasename">
sqlconnection con=new sqlconnection(str);
string myQuery="select * from employee";
sqldataadapter adp=new sqldataadapter(myquery,con);
dataset ds=new dataset()
Hope this wll Help..
Let me know any Queries..
To post reply
Related Questions Related Questions
connection string for MySQL in asp.net
Create new Database connection error
SQL 2000 Connection string problem on hosting server
dynamic sql connection string in web config file
How to check Internet connection in asp.net
Oracle Database connection Program in Vb.Net
What is connection Pooling?
Connection string in app.config?
Latest Forum Questions From The Same Category
Help to get SQL output
how to restore my sql database from my hosting provider?
SQL query to update date range
Add allowance to employee table is wrong or true according to my case
how to remove trailing zeroes in a decimal in sql server
Required Union All Result in two different column
Sql Multiple table data retrival
Table Translation records
How select huge Data from sql without take long time?
Passing using parameter in store procedure get the top3 record from the table
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend