ASP & SQL 7 Driving me Nuts

Results 1 to 2 of 2

Thread: ASP & SQL 7 Driving me Nuts

  1. #1
    Join Date
    Dec 1969

    Default ASP & SQL 7 Driving me Nuts

    Hello,<BR><BR>I am trying to build an ASP page that retrieves data from a SQL 7 database that displays the data in a dynamic table. I&#039m having a tough time getting the two to speak the same language. My web server is running NT 4.0 and IIS 4, my SQL 7 database server is running NT 4.0 as well. Currently my ASP connects to an ACCESS database on the same O/S and IIS versions, some of the code is below:<BR><BR>&#060;%<BR>dim oRSmt<BR>set oRSmt=server.createobject("ADODB.recordset")<BR>oR Smt.Open "SELECT Date, Location, Server as [Server Name], (int (Users*1)) as [Active Users], (int (CPU*100)) as [CPU % Utilization], (int (Paging*10))/10 as [Memory Paging], (int (Queue*100))/10 as [Disk Queue], (int (IO*100)) as [Disk IO] FROM mailbox WHERE Location=&#039" & Request.Form("Location") & "&#039 ORDER BY CPU DESC;", "DSN=perf"<BR>oRSmt.movefirst<BR>response.writ e "&#060;center&#062;&#060;table border=2&#062;&#060;/center&#062;&#060;tr&#062;"<BR>for each Field in oRSmt.Fields<BR> response.write "&#060;th&#062;" & & "&#060;/th&#062;"<BR>next<BR>do while not oRSmt.EOF<BR>response.write "&#060;tr&#062;"<BR> for each objField in oRSmt.fields<BR> response.write "&#060;td&#062;&#060;CENTER&#062;" & objField.value & "&nbsp;&#060;/CENTER&#062;&#060;/td&#062;"<BR> next<BR> oRSmt.movenext<BR>response.write "&#060;/tr&#062;"<BR>loop<BR>response.write "&#060;/table&#062;"<BR>oRSmt.close<BR>set oRSmt=nothing<BR>%&#062; <BR><BR>This works just fine for ACCESS. I am able to change my connection type to see the SQL database but the script blows up with the SELECT statement because SQL 7 does not know what INT is.<BR><BR>So I go into SQL Query Profiler and write something like:<BR><BR>"Select Date, Location, CPU*100, Queue*100/10, Users*1 FROM Mailbox"<BR><BR>And that works just fine, so I insert that code into the ASP script, point it at my SQL 7 database and Visual Basic blows up because it doesn&#039t understand the code I&#039ve written.<BR><BR>Is there any way to get the two to talk to each other? Basically what I would like to do is take the code above that works for ACCESS and just make it work for SQL 7.<BR><BR>Thanks....<BR><BR>Andy<BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts