| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem with Comparing Integers
I am trying to compare two integers. Please look at the below code. If the integers are not equal, I want the AreaID for a certain city to be updated. Can someone please help me with this?
Error Message: Microsoft OLE DB Provider for SQL Servererror '80040e21'Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. Here's the code that I tried to use: Microsoft OLE DB Provider for SQL Servererror '80040e21'Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. Here's the code that I tried to use: <FONT size=2><FONT face="Courier New"> 'Build the sql query used to fill the select element Last edited by Misty : October 7th, 2004 at 11:33 PM. Reason: I didn't get everything. |
|
#2
|
|||
|
|||
|
It Didn't Post All of My Code
Here's the code that I tried to use:
'Build the sql query used to fill the select element sql = "select IsNull(AreaID, 0) as AreaID from City" sql = sql & " where City= '" & hidCity & "'" sql = sql & " and State= '" & hidState & "'" 'Create a recordset set rsCity = Server.CreateObject("ADODB.Recordset") rsCity.Open sql, connectionString, adOpenDynamic, adLockOptimistic If rsCity.EOF then 'Area doesn't exist in state Response.write(hidCity & " in " & hidState & " does not exist in database") Else 'Area does exist in DB 'Check to see if the database already has this area If CLng(Area) <> CLng(rsCity("AreaID")) then 'Move to the next recordset rsCity.MoveFirst rsCity("AreaID") = Area rsCity.update End If End If |
|
#3
|
|||
|
|||
|
Error:-Overflow: 'cint'
Hi ,
I get this error Microsoft VBScript runtime (0x800A0006) Overflow: 'cint' For the following code. <%@ Language=VBScript %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <BODY> <TABLE BORDER = "2" WIDTH = "100" bgcolor=SpringGreen> <TR><CENTER>DATA</CENTER></TR> <TR> <TD>X39</TD> </TR> <tr> <% SET conn = server.CreateObject("ADODB.connection") conn.connectionstring = "User ID=dwhrep;Password=dwhrep;Data Source=dwhrep_sdw1" CONN.OPEN %> <% query1 = "select n4_unlimited_amt FROM sgw_x3_cr_demand_capacity_sum " query1 = query1 & "where organization_code ='HIM'" set rs = conn.Execute(query1) Response.Write "<tr>" while not rs.EOF if cint(rs("n4_unlimited_amt"))<1000 then Response.Write "<TD bgcolor=Red>" & RS.fields("n4_unlimited_amt") & "%</TD>" else Response.Write "<TD>" & RS.fields("n4_unlimited_amt") & "%</TD>" end if RS.MOVENEXT wend Response.Write "</tr>" %> <P> </P> </BODY> </HTML> The records in the table are 50, it works fine for just 10 records. Please help me in this |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Problem with Comparing Integers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|