ASP - My SQL con vbScript

 
Vista:

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
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:My SQL con vbScript

Publicado por weirdmix (210 intervenciones) el 05/01/2010 00:21:34
en donde abres el RS???
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar