Theres been a few questions with this but as far as I know/believe they don't help me at all. My code was working fine previously. But for some reason stopped. My sql server version is 2012. The specific error is:
[Microsoft][ODBC SQL Server Driver][SQL Server] Changed database context to 'sqldbname'
My ASP code:
<!--#include file="connv.inc"-->
<%
n=Request.form("total")
response.write(n)
for x = 0 to n-1
ttitle=Request.form("title_"&x)
title=Replace(ttitle, "'", "''")
id=Request.form("id_"&x)
views=Request.form("vViews_"&x)
likes=Request.form("vLikes_"&x)
description=Request.form("vDescription_"&x)
sql="INSERT INTO tbl_videos(videoTitle, videoId, videoLikes, videoViews, videoDescription, swamCompatible) values ('"&title&"', '"&id&"', '"&likes&"', '"&views&"', '"&description&"', '0')"
connv.execute(sql)
response.write(sql&"<br>")
next
%>
<html>
<head>
<title> Updating Tables </title>
</head>
<body>
</body>
</html>
<!--#include file="closeEmv.inc"-->
connv.inc code:
<%
set connv = server.createobject("ADODB.Connection")
connv.open "DRIVER={SQL SERVER}; SERVER=52.2.8.73; UID=myuid; PWD=mypwd; DATABASE=sqldbname"
%>
sqldbnamea valid database name on your server? - Bond