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
RealSalsafreak View Drop Down

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: 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 

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"
Response.Write "Connected NOT OK"
End If

objRS.Open objRS, objConn

If Not objRS.EOF Then
Response.Write objRS.RecordCount
response.write "niks" 
End If
Set objRS=Nothing
Set objConn=Nothing

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
 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 X 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.