My SQL con vbScript
Publicado por Juan Carlos Cordero B. (1 intervención) el 19/11/2009 21:10:14
TENGO UNA BASE DE DATOS CON MySQL DONDE ME CONECTO CON LA FUNCION: oConex Session(nom_dba"),
EJECUTO UN QUERY PARA EXTRAER cuenta y nombre, ME DESPLIEGA LA CUENTA PERO EL NOMBRE ME SALE EL SIGUIENTE ERROR: Expected end of statement
No entiendo porque el campo rs(0) que es VARCHAR en MySql si lo muestra, el otro campo rs(1) que tambien es VARCHAR me sale el error antes mencionado (Expected end of statement)
rs(0)="100-000-000" *******************Este si lo muestra
rs(1)="JUAN PEREZ SANCHEZ" ************Este sale el error
Estoy usando VBscript segun funcion anexa.
<!--#include file="./db_utils.asp"-->
<SCRIPT TYPE="text/vbscript" LANGUAGE="VBScript">
<!--
<%
oConex Session("nom_dba")
ret=sql_send("SELECT cuenta, nombre FROM cont01 ORDER BY cuenta")
%>
nCTAS = <%=nrows%>
Parent.Frames("right1").Document.Forms("cuentas").Item("catalogo").Length = nCTAS
nREGS=0
nXXX=0
<%Do Until rs.Eof%>
If nXXX<5 Then
MsgBox "<%=rs(0)%> : <%=rs(1)%>"
End If
nXXX = nXXX + 1
sCTA = "<%=rs(0)%> : ERROR EN CAMPO-NOMBRE CTA"
Parent.Frames("right1").Document.Forms("cuentas").Item("catalogo").Options(nREGS).Text=sCTA
nREGS=nREGS+1
<%
rs.MoveNext
Loop%>
-->
</SCRIPT>
*************************************************************************************************
Q estoy haciendo mal???? alguien me podria ayudar se lo agradeceria
EJECUTO UN QUERY PARA EXTRAER cuenta y nombre, ME DESPLIEGA LA CUENTA PERO EL NOMBRE ME SALE EL SIGUIENTE ERROR: Expected end of statement
No entiendo porque el campo rs(0) que es VARCHAR en MySql si lo muestra, el otro campo rs(1) que tambien es VARCHAR me sale el error antes mencionado (Expected end of statement)
rs(0)="100-000-000" *******************Este si lo muestra
rs(1)="JUAN PEREZ SANCHEZ" ************Este sale el error
Estoy usando VBscript segun funcion anexa.
<!--#include file="./db_utils.asp"-->
<SCRIPT TYPE="text/vbscript" LANGUAGE="VBScript">
<!--
<%
oConex Session("nom_dba")
ret=sql_send("SELECT cuenta, nombre FROM cont01 ORDER BY cuenta")
%>
nCTAS = <%=nrows%>
Parent.Frames("right1").Document.Forms("cuentas").Item("catalogo").Length = nCTAS
nREGS=0
nXXX=0
<%Do Until rs.Eof%>
If nXXX<5 Then
MsgBox "<%=rs(0)%> : <%=rs(1)%>"
End If
nXXX = nXXX + 1
sCTA = "<%=rs(0)%> : ERROR EN CAMPO-NOMBRE CTA"
Parent.Frames("right1").Document.Forms("cuentas").Item("catalogo").Options(nREGS).Text=sCTA
nREGS=nREGS+1
<%
rs.MoveNext
Loop%>
-->
</SCRIPT>
*************************************************************************************************
Q estoy haciendo mal???? alguien me podria ayudar se lo agradeceria
Valora esta pregunta


0