INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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

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

(OP)
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?

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

HI

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

Jean-Christophe

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close