Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Query Timeout
08-21-2014, 01:05 AM #1
- Join Date
- Jun 2006
- Thanked 0 Times in 0 Posts
I have the following ASP code (snippet) that calls/links to another page. Below is the code snippet:
<a href="close_reporter2.asp?serial=<%response.write rsqdb("serial")%>"><%response.write rsqdb("serial")%></a>
Below is the close_reporter2.asp code:
<% Option Explicit %> <% Dim serverid, conn, rsqdb, rsUpdate, rs, objConnection, serial, acknowledged, strQuery, cmd Function ChkString(string) If string = "" Then string = " " ChkString = Replace(string, "'", "'") End Function serial = ChkString(Request.QueryString("serial")) acknowledged = ChkString(Request.QueryString("acknowledged")) Response.Buffer=False set Conn=Server.CreateObject("ADODB.Connection") set cmd = server.CreateObject("ADODB.Command") cmd.CommandTimeout = 600 set rsUpdate = server.CreateObject("ADODB.Recordset") Conn.open "Provider=sqloledb;Server=nnn.nnn.nnn.nnn;Initial Catalog=reporter;UID=xxxx;PWD=xxxx;" strQuery = "select serial from [REPORTER].[reporter].[REPORTER_STATUS] with (NOLOCK) where (serial = '19917050') " %>
Any ideas are appreciated!
08-28-2014, 08:05 PM #2
So did you ever figure this out?
First thing to do would have been to run the query
select serial from [REPORTER].[reporter].[REPORTER_STATUS] with (NOLOCK) where (serial = '19917050')
in your SQL Server management studio.
I'm betting that you will get an error because of [REPORTER].[reporter]
[REPORTER] will be the name of the database.
[reporter] will be the name of the user.
Note that neither of those are case sensitive. You would get the same result with [reporter][REPORTER] or even [rEPorTEr][repORTeR], etc.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.