Link to home
Start Free TrialLog in
Avatar of Cornee
Cornee

asked on

IB 5.6 update text in blob

Hello I have a problem with update text in ib 5.6
read is no problem.

first I tried this:
Set RS=myadoDBconn.Execute("UPDATE PMMEMO SET TEKST='jaap'")


I get the error

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[INTERSOLV][ODBC InterBase driver][InterBase]conversion error from string "BLOB"

then I tried this

cmd.SQLType = text
cmd.sql = "UPDATE into table(PMMEMO, TEKST) values (?,?)"
cmd.parameters(0).value = 1
cmd.parameters(1).value = 'This is new blob text' (177)
cmd.ExecSQL

I get the error

Error Type:
Compilatiefout Microsoft VBScript (0x800A03EA)
Syntaxisfout
/call.asp, line 177, column 26

Please help cornee


 
Avatar of BAlexandrov
BAlexandrov

The right way is with parameters. Read about right use of them in ado reference
Avatar of Cornee

ASKER


I need more info please ( I am a newbee)


I cant seem to find the info I need about parameters.
where can I find this ADO reference.. MS i guess..
I only find .net stuff

Is it possible at all to insert text in a blob field with ASP?

Do I Need Stored Procedures ?
Do I need UDF or FreeUDFLib or something?

totally lost here....

-Cornee
ASKER CERTIFIED SOLUTION
Avatar of BAlexandrov
BAlexandrov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cornee

ASKER

I tried a lot of examples with parametrized but no succes
When i tried the code of www.ibprovider.com i get this error:

the error
ADODB.Parameters (0x800A0E7C)
Parameter object is improperly defined. Inconsistent or incomplete
information was provided.

This is my code:

set cmd=createobject("adodb.command")
cmd.ActiveConnection= myADODBconn
cmd.CommandText = "insert into PMOPDRACHT (CONTACTNAAM) values(?)"

cmd.Parameters.Append cmd.CreateParameter("CONTACTNAAM",VarChar, , , "AAA")

cmd.Execute

This is not a blob field but a varchar, when varchar is working then i go try to insert a blob field.


What is going wrong here??????
Please help me



Avatar of Cornee

ASKER

It is working with parametrized query and get chunk but thanks!!!!!