Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to make connectivity to database i have tried so many times but it is not working my code is as below in classic asp please help

VB
<%
   dim str

Set conn = Server.CreateObject("ADODB.Connection")
str ="Data Source Name='samp';Server=windows\SQLEXPRESS;Database=product;User Id='';Password='';"
             conn.open str
%>
Posted
Updated 25-May-11 5:33am
v2

To me your connection string looks incorrect. No user id, password?
Look at [^] to see how to construct a connecting string.

UDL File[^] is another option to build one and test connection.
 
Share this answer
 
Try to check the connection string using UDL. Here is MSDN article how to do so.Creating and Configuring UDL[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900