Getrows en asp

No me funciona Getrows con windows 2000 y el iss, en cambio en windows 98 me funciona correctamente. Me puedes ayudar?. Gracias.
Respuesta
1
Me gustaria saber cual es el error que te despliega en el browser y cuando dices que no funciona correctamente, a que te refieres.
------------------------------
Aqui hay un ejemplo de Getrow
Pruebalo a ver si te es util.
http://www.asp101.com/samples/viewasp.asp?file=db%5Fgetrows%2Easp
Este es un ejemplo de Getrow.
------------------------------
Esto es lo que me responde. Pero en cambio el ejemplo que me das funciona correctamente. Mira a ver si sabes lo que es, me tiene loco. Al final te envio el codigo de toda la página, aunque es un poco largo. Gracias por tu interes y recibe un saludo.
No se puede mostrar la página
Hay un problema con la página que está intentando ver y no se puede mostrar.
--------------------------------------------------------------------------------
Please try the following:
Haga clic en el botón Actualizar o inténtelo de nuevo más tarde.
Abra la página principal de 127.0.0.1 y, a continuación, busque vínculos a la información que desea.
HTTP 500.100. Error interno del servidor: error de ASP
Servicios de Internet Information Server
--------------------------------------------------------------------------------
Información técnica (para personal de soporte técnico)
Tipo de error:
ADODB.Recordset (0x800A0BCD)
El valor de BOF o EOF es True, o el actual registro se eliminó; la operación solicitada requiere un registro actual.
/webconta/balopeabajoinf.asp, line 130
Tipo de explorador:
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Página:
POST 6 bytes to /webconta/balopeabajoinf.asp
Datos de POST:
cuen=3
Hora:
lunes, 22 de julio de 2002, 17:21:49
Más información:
Soporte técnico de Microsoft
****************** Pagina asp **********
<html>
<head>
<title></title>
<STYLE type="text/css">
<!--
BODY {
scrollbar-face-color:#ffb000;
scrollbar-highlight-color:#ffb000;
scrollbar-shadow-color:white;
scrollbar-base-color:#ffb000;
scrollbar-arrow-color:#990066;
scrollbar-track-color:#fffff1;
}
-->
</STYLE>
<style type="text/css">
.g{font-size:12;color:#000000;font-family:arial,helvetica;font-weight:700;}
.s1{font-size:10;color:#000000;font-family:arial,helvetica;}
.s2{font-size:8;color:#000000;font-family:arial,helvetica;}
.t{font-size:14;color:#3300CC;font-family:arial,helvetica;font-weight:700;}
</style>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body bgcolor="#FFFFF1" vlink="#3300CC">
<% if Session("aut")=false then
Response.End
end if
%>
<div align="left">
<SCRIPT languaje="javascript">
function click(e) {
// Explorer
if (IE)
if (event.button == 2){
accion() ;
return false ;
}
// Netscape
if (NS)
if (e.which == 3) {
accion() ;
return false ;
}
}
function accion() {
window.status = 'Pulsación de botón no permitida' ;
if (IE) alert('Pulsación de botón no permitida');
return ;
}
var NS = (document.layers) ;
var IE = (document.all) ;
if (NS) document.captureEvents(Event.MOUSEDOWN) ;
document.onmousedown = click ;
</SCRIPT>
<%
Dim mesacumulado, mda, numes
mesacumulado= Request.Form("cuen")
if Session("eje")<2002 then
mda="Peseta."
else
mda="Euros."
end if
%>
<% Function num(numero)
if Session("eje")<2002 then
mda="Peseta."
num=numero
else
mda="Euros."
num=formatnumber(numero,2,-1)
end if
end function
Dim oConn, rs,SQL, SQL1,SQLV, SQLT, meses, DATOS, I,A, J, basedatos, saldo, saldovbl, ano
basedatos="c:\wgolden\datos\" & Session("dat")
'Si no lo ha enviado, es decir no hay nada en estas variables
' linea 100
'le presentamos el formulario
ano= Session("eje")
saldo=0
set oConn=Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & basedatos & ";"
meses="[DEBE_00]-[HABER_00]"
J=0
Do while J<12
if J<(formatnumber(mesacumulado,0)*1) then
if J<9 then
meses= meses & "+[DEBE_0" & J+1 & "]-[HABER_0" & J+1 & "]"
else
meses= meses & "+[DEBE_" & J+1 & "]-[HABER_" & J+1 & "]"
end if
end if
J= J+1
loop
' numero de campos 0 1 2 3 4 5 6
SQL="SELECT Val([Saldos Cuentas]![Cuenta]) AS CUEN, [Saldos Cuentas].Cuenta, Cuentas.Titulo, [Saldos Cuentas].Año, [Saldos Cuentas].DEBE_00, [Saldos Cuentas].HABER_00, " & meses & " AS saldo FROM [Saldos Cuentas] INNER JOIN Cuentas ON [Saldos Cuentas].Cuenta = Cuentas.Cuenta"
SQL1=" WHERE (((Val([Saldos Cuentas]![Cuenta]))<600) AND (([Saldos Cuentas].Año)="& ano &") AND ((" & meses & ")<>0)) ORDER BY Val([Saldos Cuentas]![Cuenta]);"
SQLT=SQL & SQL1
set rs=oConn.Execute(SQLT)
DATOS= rs.GetRows()
Function buscarcta(cta)
buscarcta=0
For i=lbound(DATOS,2) to UBound(DATOS,2)
If DATOS(0,i)=cta Then
Buscarcta=DATOS(6,i)
end if
next
End Function
Dim parsdo, tpnsaldo
Function buscarsdo(numero)
buscarsdo=0
parsdo=Split(numero, "_", -1, 1)
For j=lbound(parsdo) to UBound(parsdo)
tpnsaldo=Buscarcta(Cint(mid(parsdo(j),2,10)))
if left(parsdo(j),1)="T" then
Buscarsdo=Buscarsdo + tpnsaldo
else
if left(parsdo(j),1)="N" and tpnsaldo<0 then
Buscarsdo=Buscarsdo + tpnsaldo
else
if left(parsdo(j),1)="P" and tpnsaldo>0 then
Buscarsdo=Buscarsdo + tpnsaldo
end if
end if
end if
next
End function
%>
</div>
<div id="Layer1" style="position:absolute; width:738px; height:73px; z-index:1; left: 26px; top: 9px">
<table width="95%" border="1" bordercolor="#000000">
<tr>
<td colspan="2">
<div align="center"><b><font size="3" color="#330099" face="Verdana, Arial, Helvetica, sans-serif">Balance
Operativo.</font></b></div>
</td>
<td width="34%">
<div align="right"><b><font color="#330099" size="1" face="Verdana, Arial, Helvetica, sans-serif">Ejercicio:
<%=Session("eje") & " Moneda: " & mda%></font></b></div>
</td>
</tr>
<tr>
<td colspan="3"><b><font color="#009933" size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=Session("nom")%></font></b></td>
</tr>
<tr>
<td width="28%"><b><font color="#009933" size="1" face="Verdana, Arial, Helvetica, sans-serif">Saldos
acmulados hasta el mes:</font></b></td>
<td width="38%"><b><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=mesacumulado%></font></b></td>
<td width="34%">
<div align="right"><font size="1" color="#009933" face="Verdana, Arial, Helvetica, sans-serif"><b><%=FormatDateTime(Now, vbLongDate)%></b></font></div>
</td>
</tr>
</table>
</div>
<p> </p>
<div id="Layer2" style="position:absolute; width:375px; height:115px; z-index:2; left: 386px; top: 103px">
<table width="100%" border="0">
<tr bgcolor="#CCCCCC">
<td colspan="5" bordercolor="#000000">
<div align="center"><font color="#3300CC" size="2" face="Verdana, Arial, Helvetica, sans-serif"></font></div>
<div align="center"><font color="#3300CC" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>PASIVO</b></font></div>
</td>
</tr>
<tr>
<td colspan="3"><font color="#3300CC" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Descripción</b></font></td>
<td width="42%">
<div align="right"><b><font color="#3300CC"><% Session("eje") %></font></b></div>
</tr>
<tr>
<% grupo("FONDOS PROPIOS;T10_T11_T12_T557;P")
subgrupo("Capital suscrito.;T10")
subsubgrupo("T100_T101_T102")
subgrupo("Prima de emisión.;T110")
subsubgrupo("T110")
subgrupo("Reserva de revalorización.;T111")
subsubgrupo("T111")
subgrupo("Reservas.;T112_T113_T114_T115_T116_T117")
subsubgrupo("T112_T113_T114_T115_T116_T117")
subgrupo("Resultados de ejercicios anteriores.;T120_T121_T122")
subsubgrupo("T120_T121_T122")
subgrupo("Perdidas y ganancias.;T129")
subsubgrupo("T129")
subgrupo("Dividendo a cuenta entregado en el ejercicio.;T557")
subsubgrupo("T557")
grupo("INGRESOS A DISTRIBUIR EN VARIOS EJERCICIOS.;T13;P")
subsubgrupo("T130_T131_T132_T133_T134_T135_T136")
grupo("PROVISIONES PARA RIESGOS Y GASTOS.;T14;P")
subsubgrupo("T140_T141_T142_T143_T144")
grupo("ACREEDORES A LARGO PLAZO.;T15_T16_T17_T18_T248_T249_T259;P")
subsubgrupo("T150_T151_T155_T160_T161_T162_T163_T164_T165_T170_T171_T172_T173_T174_T180_T185_T248_T249_T259")
grupo("ACREEDORES A CORTO PLAZO;T400_T401_T402_T403_T406_T41_T437_T465_T475_T476_T477_T478_T479_T485_T499_T500_T501_T505_T506_T509_T51_T52_N550_N551_N552_N553_T555_T556_T560_T561_T585;P")
subsubgrupo("T400_T401_T402_T403_T406_T410_T411_T419_T437_T465_T475_T476_T477_T485_T499_T500_T501_T505_T506_T509_T510_T511_T512_T513_T514_T515_T516_T517_T520_T521_T523_T524_T525_T526_N550_N551_N552_N553_T555_T556_T560_T561_T585")
Response.Write "</table>"
%>
</div>
<p> </p>
<div id="Layer3" style="position:absolute; width:375px; height:168px; z-index:2; left: 1px; top: 103px">
<table width="100%" border="0">
<tr bgcolor="#CCCCCC">
<td colspan="5" bordercolor="#000000">
<div align="center"><font color="#3300CC" size="2" face="Verdana, Arial, Helvetica, sans-serif"></font></div>
<div align="center"><font color="#3300CC" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>ACTIVO</b></font></div>
</td>
</tr>
<tr>
<td colspan="3"><font color="#3300CC" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Descripción</b></font></td>
<td width="42%">
<div align="right"><b><font color="#3300CC"><% Session("eje") %></font></b></div>
</td>
</tr>
<%
grupo("ACCIONISTAS POR DESEMBOLSOS NO EXIGIDOS.;T190_T191_T192_T193_T194_T195_T196;A")
subsubgrupo("T190_T191_T192_T193_T194_T195_T196")
grupo("INMOVILIZADO.;T20_T21_T22_T23_T28_T291_T292;A")
subgrupo("Gastos de establecimiento.;T20")
subsubgrupo("T200_T201_T202")
subgrupo("Inmovilizaciones inmateriales.;T21_T281_T291")
subsubgrupo("T210_T211_T212_T213_T214_T215_T216_T217_T219_T281")
subgrupo("Inmovilizaciones materiales.;T22_T23_T282_T292")
subsubgrupo("T220_T221_T222_T223_T224_T225_T226_T227_T228_T229_T230_T231_T232_T233_T234_T235_T236_T237_T238_T239_T282_T292")
subgrupo("Inmovilizaciones financieras.;T24_T25_T26_T293_T294_T295_T296_T297_T298")
subsubgrupo("T240_T241_T242_T243_T244_T245_T246_T247_T250_T251_T252_T253_T254_T256_T257_T258_T260_T265_T293_T294_T295_T296_T297_T298")
subgrupo("Acciones propias.;T198")
subsubgrupo("T198 ")
grupo("GASTOS A DISTRIBUIR EN VARIOS EJERCICIOS.;T27;A")
subsubgrupo("T270_T271_T272")
grupo("ACTIVO CIRCULANTE.;T558_T30_T31_T32_T33_T34_T35_T36_T39_T407_T430_T431_T432_T433_T435_T436_T440_T441_T445_T449_T460_T470_T471_T472_T473_T474_T490_T493_T494_T544_P550_P551_P552_P553_T53_T54_T565_T566_T593_T594_T595_T596_T597_T598_T57_T480_T580;A")
subgrupo("Accionistas por desembolsos exigidos.;T558")
subsubgrupo("T558")
subgrupo("Existencias.;T30_T31_T32_T33_T34_T35_T36_T39_T407")
subsubgrupo("T300_T301_T310_T311_T320_T321_T322_T325_T326_T327_T328_T330_T331_T340_T341_T350_T351_T360_T361_T365_T366_T368_T369_T390_T391_T392_T393_T394_T395_T396_T407")
subgrupo("Deudores.;T430_T431_T432_T433_T435_T436_T440_T441_T445_T449_T460_T470_T471_T472_T473_T474_T490_T493_T494_T544_P550_P551_P552_P553")
subsubgrupo("T430_T431_T432_T433_T435_T436_T440_T441_T445_T449_T460_T470_T471_T472_T473_T474_T490_T544_T550_T551_T552_T553")
subgrupo("Inversiones financieras temporales.;T53_T54_T565_T566_T593_T594_T595_T596_T597_T598")
subsubgrupo("T530_T531_T532_T533_T534_T535_T536_T537_T538_T539_T540_T541_T542_T543_T546_T547_T548_T549_T565_T566_T593_T594_T595_T596_T597_T598")
subgrupo("Tesoreria.;T57")
subsubgrupo("T570_T571_T572_T573_T574_T575")
subgrupo("Ajustes por periodificación.;T480_T580")
subsubgrupo("T480_T580")
Response.write "</table>"
final()
%>
<%
DIM cugrupo, activo, pasivo, SALDOBUSCADO
activo=0
pasivo=0
Sub grupo(val)
cugrupo=Split(val, ";", -1,1)
SALDOBUSCADO=buscarsdo(cugrupo(1))
if Right(val,1)="A" then
activo=activo+ saldobuscado
else
pasivo=pasivo+saldobuscado
end if
IF SALDOBUSCADO<>0 THEN
Response.Write "<tr>"
Response.Write "<td class=""g"" colspan=""3""><font size=""1"" face=""Arial, Helvetica, sans-serif"" class=""g"">"
Response.Write cugrupo(0) & "</font></td>"
Response.Write "<td width=""33%"" class=""g"">"
Response.Write "<div align=""right"">" & buscarsdo(cugrupo(1)) & "</div>"
Response.Write "</td>"
Response.Write "</tr>"
END IF
End Sub
Sub Subgrupo(val)
cugrupo=Split(val, ";", -1,1)
SALDOBUSCADO=buscarsdo(cugrupo(1))
IF SALDOBUSCADO<>0 THEN
Response.Write "<tr>"
Response.Write "<td width=""4%"" class=""s1""> </td>"
Response.Write "<td class=""s1"" colspan=""2""><font size=""1"" face=""Arial, Helvetica, sans-serif"" class=""s1"">"
Response.Write cugrupo(0) & "</font></td>"
Response.Write "<td width=""33%"" class=""s1""> "
Response.Write "<div align=""right"">" & buscarsdo(cugrupo(1)) & "</div>"
Response.Write "</td>"
Response.Write "</tr>"
END IF
End Sub
sub subsubgrupo(val)
cugrupo=Split(val, "_", -1,1)
For j=lbound(cugrupo) to UBound(cugrupo)
For i=lbound(DATOS,2) to UBound(DATOS,2)
If DATOS(0,i)=cint(mid(cugrupo(j),2,10)) and DATOS(6,i)<>0 and left(cugrupo(j),1)="T" Then
Response.Write "<tr>"
Response.Write "<td class=""s2"" width=""4%""> </td>"
Response.Write "<td class=""s2"" width=""4%"">" & DATOS(0,i) & "</td>"
Response.Write "<td class=""s2"" width=""70%""><font size=""1"" face=""Arial, Helvetica, sans-serif"" class=""s1"">"
Response.Write DATOS(2,i) & "</font></td>"
Response.Write "<td width=""33%"" class=""s2""> "
Response.Write "<div align=""right"">" & DATOS(6,i) & "</div>"
Response.Write "</td>"
Response.Write "</tr>"
end if
If DATOS(0,i)=cint(mid(cugrupo(j),2,10)) and DATOS(6,i)<0 and left(cugrupo(j),1)="N" Then
Response.Write "<tr>"
Response.Write "<td class=""s2"" width=""4%""> </td>"
Response.Write "<td class=""s2"" width=""4%"">" & DATOS(0,i) & "</td>"
Response.Write "<td class=""s2"" width=""70%""><font size=""1"" face=""Arial, Helvetica, sans-serif"" class=""s1"">"
Response.Write DATOS(2,i) & "</font></td>"
Response.Write "<td width=""33%"" class=""s2""> "
Response.Write "<div align=""right"">" & DATOS(6,i) & "</div>"
Response.Write "</td>"
Response.Write "</tr>"
end if
If DATOS(0,i)=cint(mid(cugrupo(j),2,10)) and DATOS(6,i)>0 and left(cugrupo(j),1)="P" Then
Response.Write "<tr>"
Response.Write "<td class=""s2"" width=""4%""> </td>"
Response.Write "<td class=""s2"" width=""4%"">" & DATOS(0,i) & "</td>"
Response.Write "<td class=""s2"" width=""70%""><font size=""1"" face=""Arial, Helvetica, sans-serif"" class=""s1"">"
Response.Write DATOS(2,i) & "</font></td>"
Response.Write "<td width=""33%"" class=""s2""> "
Response.Write "<div align=""right"">" & DATOS(6,i) & "</div>"
Response.Write "</td>"
Response.Write "</tr>"
end if
next
next
end sub
%>
</div>
<p> </p>
<p> </p>
<%
rs.close
set rs=nothing
oConn.close
set oConn=nothing
sub final()
dim totalactivo, totalpasivo
Response.Write "<div id=""Layer4"" style=""position:absolute; width:760px; height:115px; z-index:3; left: 1; top: 750px""> "
Response.Write "<table width=""100%"" border=""0"" bordercolor=""#CCCCCC"">"
Response.Write " <tr bgcolor=""#CCCCCC"" bordercolor=""#CCCCCC""> "
Response.Write " <td width=""25%"" height=""20""> "
if activo< (pasivo)*(-1) then
totalactivo=(pasivo)*(-1)
totalpasivo=(pasivo)*(-1)
Response.Write " <div align=""right"" class=""g"">Resultado (Pérdidas)</div>"
Response.Write " </td>"
Response.Write " <td height=""20"" width=""25%"" > "
Response.Write " <div align=""right"" class=""g"">" & (activo+pasivo)*(-1) & "</div>"
Response.Write " </td>"
else
Response.Write " <div align=""right"" class=""g"">  </div>"
Response.Write " </td>"
Response.Write " <td height=""20"" width=""25%"" > "
Response.Write " <div align=""right"" class=""g"">  </div>"
end if
if activo>(pasivo)*(-1) then
totalactivo=activo
totalpasivo=activo
Response.Write " <td width=""25%"" height=""20""> "
Response.Write " <div align=""right"" class=""g"">Resultado (Ganancias)</div>"
Response.Write " </td>"
Response.Write " <td height=""20"" width=""25%"" > "
Response.Write " <div align=""right"" class=""g"">" & activo+pasivo & "</div>"
Response.Write " </td>"
else
Response.Write " <td width=""25%"" height=""20""> "
Response.Write " <div align=""right"" class=""g"">  </div>"
Response.Write " </td>"
Response.Write " <td height=""20"" width=""25%"" > "
Response.Write " <div align=""right"" class=""g"">  </div>"
Response.Write " </td>"
end if
Response.Write " </tr>"
Response.Write " <tr bgcolor=""#CCCCCC"" bordercolor=""#CCCCCC""> "
Response.Write " <td height=""12"" width=""25%""><font color=""#3300CC"" size=""2"" face=""Verdana, Arial, Helvetica, sans-serif"" class=""t""><b>Total "
Response.Write " Activo</b></font> "
Response.Write " <div align=""right""><b></b></div>"
Response.Write " </td>"
Response.Write " <td height=""12"" width=""25%""> "
Response.Write " <div align=""right""><b><font color=""#3300CC"" class=""t"">" & totalactivo & "</font></b></div>"
Response.Write " </td>"
Response.Write " <td colspan=""-2"" height=""12"" width=""25%""> "
Response.Write " <div align=""left""><b><font color=""#3300CC"" class=""t"">Total Pasivo</font></b></div>"
Response.Write " </td>"
Response.Write " <td height=""12"" width=""13%""> "
Response.Write " <div align=""right""><b><font color=""#3300CC"" class=""t"">" & totalpasivo & "</font></b></div>"
Response.Write " </td>"
Response.Write " </tr>"
Response.Write " <tr bgcolor=""#FFFFFF"" bordercolor=""#CCCCCC""> "
Response.Write " <td colspan=""3""> </td>"
Response.Write " <td width=""27%"" colspan=""-1""> </td>"
Response.Write " <td width=""10%""> </td>"
Response.Write " <td width=""13%"" bgcolor=""#FFFFFF"" colspan=""2""> </td>"
Response.Write " </tr>"
Response.Write " <tr bgcolor=""#FFFFFF"" bordercolor=""#CCCCCC""> "
Response.Write " <td colspan=""3""><font size=""-2"">*** Este documento es meramente informativo "
Response.Write " y carece de validez ante cualquier litigio. </font><font color=""#3300CC"" size=""2"" face=""Verdana, Arial, Helvetica, sans-serif""></font> "
Response.Write " <div align=""right""><b></b></div>"
Response.Write " </td>"
Response.Write " <td width=""27%"" colspan=""-1""> "
Response.Write " <div align=""left""><b><font color=""#3300CC"" size=""2"" face=""Verdana, Arial, Helvetica, sans-serif""><a href=""javascript:self.print();""><font color=""#0000FF""><img src=""imagenes/imprimir.gif"" width=""50"" height=""20"" border=""0"" name=""imprimir""></font></a></font></b></div>"
Response.Write " </td>"
Response.Write " <td width=""10%""> </td>"
Response.Write " <td width=""13%"" colspan=""2""> </td>"
Response.Write " </tr>"
Response.Write "</table>"
Response.Write "</div>"
end sub
%>
</body>
</html>
' numero de campos 0 1 2 3 4 5 6
SQL="SELECT Val([Saldos Cuentas]![Cuenta]) AS CUEN, [Saldos Cuentas].Cuenta, Cuentas.Titulo, [Saldos Cuentas].Año, [Saldos Cuentas].DEBE_00, [Saldos Cuentas].HABER_00, " & meses & " AS saldo FROM [Saldos Cuentas] INNER JOIN Cuentas ON [Saldos Cuentas].Cuenta = Cuentas.Cuenta"
SQL1=" WHERE (((Val([Saldos Cuentas]![Cuenta]))<600) AND (([Saldos Cuentas].Año)="& ano &") AND ((" & meses & ")<>0)) ORDER BY Val([Saldos Cuentas]![Cuenta]);"
SQLT=SQL & SQL1
set rs=oConn.Execute(SQLT)
DATOS= rs.GetRows()
Function buscarcta(cta)
buscarcta=0
For i=lbound(DATOS,2) to UBound(DATOS,2)
If DATOS(0,i)=cta Then
* Aparentemente lo que estas mandando a traer de la base de datos no existe.
Trata de ejecutar tu query manualmente SQL QUERRY ANALIZER
A que te refieres con esto SQL QUERRY ANALIZER
Gracias.
La conexion que estas utilizando para tu bases de datos, supongo es SQL, donde yo creo que tienes el problema es en los datos que estas buscando. Ocurre que:
EL CLIENTE de SQL trae algo un programa llamado SQL QUERY ANALIZER lo cual puedes pegar esta consulta que tienes por ejemplo:
SQL="SELECT Val([Saldos Cuentas]![Cuenta]) AS CUEN, [Saldos Cuentas].Cuenta, Cuentas.Titulo, [Saldos Cuentas].Año, [Saldos Cuentas].DEBE_00, [Saldos Cuentas].HABER_00, " & meses & " AS saldo FROM [Saldos Cuentas] INNER JOIN Cuentas ON [Saldos Cuentas].Cuenta = Cuentas.Cuenta"
SQL1=" WHERE (((Val([Saldos Cuentas]![Cuenta]))<600) AND (([Saldos Cuentas].Año)="& ano &") AND ((" & meses & ")<>0)) ORDER BY Val([Saldos Cuentas]![Cuenta]);"
SQLT=SQL & SQL1
Y mirar a ver si esta trabajando correctamente, ya que el error que creo que tienes esta dado por este llamado a la base de datos que debe haber algo incorrecto y con el sql querry analizer te resultara mas agil sabes donde esta el error.
El SQL query Analizer lo trae el cliente de SQL. Debes tenerlo ya que estas usando base de datos sql.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas