SCM

[#1003456] problem to call a function from VB

View Trackers | Bugs | Download .csv | Monitor

Date:
2007-04-23 01:45
Priority:
3
State:
Open
Submitted by:
hensa hensa (hensa)
Assigned to:
Shachar Shemesh (shachar)
Category:
Crash
Group:
v1.0.0.19
Resolution:
None
 
Summary:
problem to call a function from VB

Detailed description
this is my code vb 6.0
and PGOLEDB 1.0.0.19
/******************************Code **************************************/
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = "Provider=PostgreSQL OLE DB Provider;Password=pwdext;User ID=user;Data Source=localhost;Location=test_db"
.CommandType = adCmdStoredProc
.CommandText = "test"
.Parameters.Append .CreateParameter("val", adVarChar, adParamReturnValue, 500)
.Parameters.Append .CreateParameter("param1", adVarChar, adParamInput, -1, nomdistri)
.Execute 'crashing here
End With
msgbox cmd.Parameters("val").Value
Set cmd = Nothing
/**********************************************************************************/

function in PostgreSQL
/*****************************************************************************/
CREATE OR REPLACE FUNCTION test(param1 varchar)
RETURNS varchar AS
$BODY$
begin
return param1;
end;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
/****************************************************************************/

error message shown is 'Incorrect Parameter'
on line .Execute

I think it's a error triggered because Varchar data type isn't known into PgoleDB

anyone may help me.

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge