Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with connection t sql 2000 :newbie

Status
Not open for further replies.

fabiovise

Technical User
Jul 19, 2001
9
IT
Hello, i'm fabio from italy, and i have a problem with connection to SQL SERVER 7 with asp.

this is the connection that i've made:

StrConnect = "Provider=SQLOLEDB; Data Source=xxx.xxx.xxx.xx,1433;
Database=mydatab; UserID=myid; Password=mypass"

Set con = Server.CreateObject("ADODB.Connection")


con.Open StrConnect

this code return an error SERVER SQL specified not found.

i'm sure that server is ok.

thank you for you advice !!
 
Hi fabio,
Just check in the ODBC driver in control pannel that what is the name of ole db provider driver. Let us say it is myDriver then change your strconnect string as follows:
StrConnect = "DRIVER=myDriver; Data Source=xxx.xxx.xxx.xx;
Database=mydatab; UserID=myid; Password=mypass"

Don't give the port number 1433.

let me know if you still face problem.
 

If you want to use OLEDB, don't bother with ODBC. Change your connection string as follows.

StrConnect "Provider=SQ[tt]L[/tt]OLEDB;Server=xxx.xxx.xxx.xx;Initial Catalog=mydatab;uid=myid;pwd=mypass"
Set con = Server.CreateObject("ADODB.Connection")
con.Open StrConnect

You can use the server name in place of the IP address. Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it if you have time.
 
thanks a lot for the advices, but still not work...

i don't know what is !

Thank you



 

Fabio,

It would be helpful if you told us the full error message you are getting.

Is there a firewall between your ASP page and the SQL Server? Is the firewall opened up for access to the server on the 1433 or the configured listen on port. Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it if you have time.
 
this is the error with the connection that tlbroadbent provide me.


Microsoft OLE DB Provider for SQL Server error '80040e0c'

Command text was not set for the command object.

/sql.asp, line 13

-------------------------------------------------------

thank you for suppport !



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top