Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make an insert of long var in an ASP Script?

Status
Not open for further replies.

shopoto

MIS
Jun 24, 2004
3
0
0
FR
Hello.

I can do insert/select in any table i want of my sqlbase database by using a script asp and a odbc link...

I can do that anywhere...
except for Long type variable...

and that my problem

here is a sample code:

<%
'Création d'un objet ADODB.Connection
Set OBJdbConnection = Server.CreateObject("ADODB.Connection") 'As ADODB.Connection
'Connection à la base OLDFEED grace au DSN
OBJdbConnection.Open "SYS_HK_OLDFEED"

str="This my long variable... This is a text which can be very long...."
SQLins="insert into TLONG (body) values ('"&str&"')"

Response.Write("La requete a effectué est: "&SQLins&"<br>")

'Création du recordset 'RSincnum'
Set RS= server.createobject("ADODB.Recordset")
'Execution de la requète
RS.Open SQLins,OBJdbConnection,3,1
%>

when i try to lauch this ASP script with my browser here is the error:


La requete a effectué est: insert into TLONG (body) values ('This my long variable... This is a text which can be very long....')


Microsoft OLE DB Provider for ODBC Drivers erreur '80004005'

[Gupta][ODBC Driver][SQLBase]01602 TYP MBB Long must be set to bind variable

/instlong.asp, ligne 33


I know that in SQLtalk i must use bind variable to insert long type variable in my table just like this:

insert into TLONG (body) values :)1)
"This my long variable... This is a text which can be very long...."
/


but how can i do bind varible in an ASP script?

 
HI

Did you find a solution for the problem with long varchar and asp ?

Jean-Christophe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top