Cannot connect to DB with asp classic and connection string
Hey folks, I have a connection string in asp and a asp page which is connected to that connection string asp page, but I got a big problem :
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
/en/tope_results.asp, line 31
this error happen when my asp page is try to connect to DB using my connection string file .
admin_sea_tracker.asp (connection string file)
tope_results.asp (Result file which use above connection for connecting to DB)
MM_admin_sea_STRING = "Provider=SQLOLEDB.1;Password=***;Persist Security Info=True;User ID=***;Initial Catalog=***;Data Source=184.108.40.206;"
Our db is SQL Server 2000. Admin give me user password that only I can access to one certain view in whole DB, I test my connection string in some connection string tester program (shown in attachment) and it said that connection managed to connect to Db successfully but I don't know where is the problem that I can't use that connection string file in my .asp pages, I just need to connect to DB by that connection string then my problem is solved, please give me some solutions.
<!--#include virtual="/Connections/admin_sea_tracker.asp" -->
Set rs_products_cmd = Server.CreateObject ("ADODB.Command")
rs_products_cmd.ActiveConnection = MM_admin_sea_STRING ===> (Line31)
rs_products_cmd.CommandText = "SELECT * FROM dbo.VSite WHERE FileNo = ?"
rs_products_cmd.Prepared = true
rs_products_cmd.Parameters.Append rs_products_cmd.CreateParameter("param1", 5, 1, -1, rs_products__MMColParam1) ' adDouble
Set rs_products = rs_products_cmd.Execute
rs_products_numRows = 0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>:: Search Result ::</title>
If you want to test the application please go to thins link and choose a radio button then enter something in shipment tracking text box (its above news frame) then click go and you'll see the error)
Thank you very much folks.
I can connect with management studio with that user pass but yet I have my problem that I posted above, Please give me a hand folks.
Last edited by datis; 04-26-2011 at 10:05 AM.
sounds like a firewall issue maybe, have you tried turning of your firewall to see if that is the issue?
The is saying it cant see any SQL server. You know your username and password is correct becuase the utility can connect. Only thing i would think is the program you installed for checking your connections is getting through your firewall but sql server is not. Check you have allowed access to the correct ports.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread