Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 database connection

Author  Topic 

dcmk7
Starting Member

2 Posts

Posted - 2009-09-21 : 09:47:19
Hi all, im obviously very new to this all.

the problem i am having is we switched servers recently and the majority of the site is working perfectly. but the part where we accept payments is on a secure license elsewhere and when saves the order it sends it to the old database

so we cant see it on the new one, i have simply copied and pasted the connection code from the 'working' pages and over-wrote where it would connect to the old database.




<!--#include file="adovbs.inc"-->
<%
Dim connProd
Dim connOrd
Dim nVAT,sVAT

nVAT = 0.15
sVAT = "15"

Sub f_setConnProd()
If StrComp(TypeName(connProd),"Nothing")=0 Then
Set connProd = Server.CreateObject("ADODB.Connection")
'connProd.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=79.99.43.20; DATABASE=discountb1; UID=discountb1;PASSWORD=******; OPTION=3"
connProd.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=CIServer12; DATABASE=BathroomBitsb1; UID=discountb1;PASSWORD=******; OPTION=3"
'connProd.Open "DSN=productsbb4u"
ElseIf Not IsObject(connProd) Then
Set connProd = Server.CreateObject("ADODB.Connection")
'connProd.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=79.99.43.20; DATABASE=discountb1; UID=discountb1;PASSWORD=******; OPTION=3"
connProd.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=CIServer12; DATABASE=BathroomBitsb1; UID=discountb1;PASSWORD=******; OPTION=3"
'connProd.Open "DSN=productsbb4u"
Else
End if
End Sub

Sub f_setConnOrd()
If StrComp(TypeName(connOrd),"Nothing")=0 Then
Set connOrd = Server.CreateObject("ADODB.Connection")
'connOrd.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=79.99.43.20; DATABASE=discountb1; UID=discountb1;PASSWORD=******; OPTION=3"
connOrd.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=CIServer12; DATABASE=BathroomBitsb2; UID=discountb2;PASSWORD=******; OPTION=3"
'connOrd.Open "DSN=ordersbb4u"
ElseIf Not IsObject(connOrd) Then
Set connOrd = Server.CreateObject("ADODB.Connection")
'connOrd.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=79.99.43.20; DATABASE=discountb1; UID=discountb1;PASSWORD=******; OPTION=3"
connOrd.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=CIServer12; DATABASE=BathroomBitsb2; UID=discountb2;PASSWORD=******; OPTION=3"
'connOrd.Open "DSN=ordersbb4u"
Else
End if
End Sub


The commented parts are where it would connect to the old database.
please if anyone can help please do, the error i receive is

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][ODBC 3.51 Driver]Unknown MySQL server host 'CIServer12' (11004)

/discount-bathroom-suites-uk/assets/includes/includes.asp, line 19

Those files are on one FTP and we have files on another. The one on the other is perfect, those connection work. but the 'secure' side thats the one thats problematic.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-09-21 : 10:13:06
This is a MICROSOFT SQL Server forum.
Try at www.dbforums.com



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2009-09-21 : 10:57:24
this looks like classic ASP, The db is not in the specified location
Go to Top of Page

dcmk7
Starting Member

2 Posts

Posted - 2009-09-21 : 11:01:50
but for the existing pages on the server - it is fine.
just when it goes to the secure ftp pages there are problems.

its all using the exact same connection code.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2009-09-21 : 12:28:59
see this
http://support.microsoft.com/kb/841922

One of the possible causes in classic ASP is

The .asp extension is not mapped in the Web application properties.
Go to Top of Page
   

- Advertisement -