Click here to Skip to main content
11,637,662 members (75,176 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP
How do I establish a connection to sql in msfrontpage?

I have done this:
Dim Conn,objrs
Set Conn=server.CreateObject("ADODB.Connection")
Conn.ConnectionString="Provider={SQL Server}; Data Source=dataserver;Initial Catalog=dbname; User ID=uid; Password=pswrd"	
set objrs=Server.CreateObject("ADODB.Recordset")
strSQL="select field1 from table1" strSQL,Conn,3,3
response.write "test"
but it shows an error:
Error Type:
ADODB.Connection (0x800A0E7A)
Provider cannot be found. It may not be properly installed.
/iss/example.asp, line 12
What should I do?
Posted 8-Oct-12 23:40pm
Edited 9-Oct-12 4:05am
Tim Corey100K

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I see a couple things here. First, you are trying to use ADODB for your connection and yet you are using an OLEDB connection string. The difference is important. If I recall correctly, you should use OLEDB for Frontpage/Classic ASP connections. I'm not sure if it is because it doesn't support ADO or if it was something else. In any event, here is a site that will give you an example of how to connect to a SQL database:[^]

If you are wondering about different SQL connection strings, you can always go to[^]. Just make sure you pick the right one for your situation.

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 334
1 OriginalGriff 295
2 stibee 288
3 270
4 himanshu agarwal 189
0 OriginalGriff 9,031
1 Sergey Alexandrovich Kryukov 8,763
2 Mika Wendelius 6,999
3 F-ES Sitecore 2,388
4 Suvendu Shekhar Giri 2,320

Advertise | Privacy | Mobile
Web03 | 2.8.150728.1 | Last Updated 9 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100