Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - classic asp to sql 2014 connection string
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

classic asp to sql 2014 connection string

 Post Reply Post Reply Page  12>
Author
RealSalsafreak View Drop Down
Newbie
Newbie


Joined: 03 April 2015
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote RealSalsafreak Quote  Post ReplyReply Direct Link To This Post Topic: classic asp to sql 2014 connection string
    Posted: 03 July 2017 at 2:15pm
I migrated to sql 2016 and it seems the connection is doing well, only i get no data back from the database. Here's my test script 
<code>

<%
Dim objConn
Dim strSQL
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT top 10 * FROM factuur"
objConn.Open "Provider=SQLOLEDB;Data Source=MYSERVER;User ID=sql_user;Password=password;Database=DBNAME;"
If objConn.errors.count = 0 Then
Response.Write "Connected OK"
else 
Response.Write "Connected NOT OK"
End If

objRS.Open objRS, objConn

If Not objRS.EOF Then
Response.Write objRS.RecordCount
Else
response.write "niks" 
End If
objRS.close
Set objRS=Nothing
objConn.close
Set objConn=Nothing
%>
</code>

then i get the message that my connection is ok, but i see no record count: Connected OKAn error occurred on the server when processing the URL. Please contact the system administrator. 
If you are the system administrator please click here to find out more about this error.

Am i missing something here?



Back to Top
lyndaeldo View Drop Down
Newbie
Newbie


Joined: 21 September 2015
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote lyndaeldo Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2015 at 8:30am
Hope this will help you..... http://asp.net-inations.com/-providers/sql-connection.htm - Asp.Net Connectionstring
 
Lynda
Back to Top
addseo1115 View Drop Down
Newbie
Newbie
Avatar

Joined: 11 April 2015
Location: ไทย
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote addseo1115 Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2015 at 4:18am
Thanks for the useful recommends. Your post is so nice. LOL
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Poole
Status: Offline
Points: 9748
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2015 at 12:54pm
It looks like it is failing to find the server and/or instance name.

Check that you have the server name and instance name correct and that TCP/IP is enabled in SQL Server for the IP address you are connecting on. Also check the firewall has port 1433 open.
Back to Top
RealSalsafreak View Drop Down
Newbie
Newbie


Joined: 03 April 2015
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote RealSalsafreak Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2015 at 9:59am
Yes, it is mixed mode and also tcp/ip is enabled
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Poole
Status: Offline
Points: 9748
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2015 at 7:46am
Classic ASP uses TCP/IP to connect to the database server.

Did you install SQL Server in mixed mode in order to allow TCP/IP connections?
Back to Top
RealSalsafreak View Drop Down
Newbie
Newbie


Joined: 03 April 2015
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote RealSalsafreak Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2015 at 7:33pm
I changed the connection string as you suggested and i enabled named pipes, but still i get an error:
Microsoft SQL Server Native Client 10.0 error '80004005'

SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. 

/scripts/connect.asp, line 7 


Any suggestions what i can try next?


Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Poole
Status: Offline
Points: 9748
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2015 at 11:15am
The simplest way is to use the SQLOLEDB driver which will work with all versions of SQL Server as far as I am aware with Classic ASP.

ConnectString = "Provider=SQLOLEDB;Server=myserver\KATMAI;User ID=sql_user;Password=sql_pass;Database=KATMAI;"
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.06
Copyright ©2001-2023 Web Wiz Ltd.


Become a Fan on Facebook Follow us on Twitter Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2023 Web Wiz Ltd. All rights reserved.