[unixODBC-support] inputOutput parameter problem in calling stored Procedure

Bartolomeo Nicolotti bnicolotti at siapcn.it
Mon Feb 16 10:30:29 GMT 2009




Nick Gorham-2 wrote:
> 
> Bartolomeo Nicolotti wrote:
> 
>>
>>  
>>
>>
>>[ODBC][11917][SQLPrepareW.c][126]
>>		Entry:            
>>			Statement = 0x83df158            
>>			SQL = [{CALL GIANLUCA.Provacs( ? )}][length = 28]
>>[ODBC][11917][SQLPrepareW.c][300]
>>		Exit:[SQL_ERROR]
>>		DIAG [42S02] [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0204 - PROVACS
>>in GIANLUCA di tipo *N non trovato.
>>
>>
>>the error means that the prepare is searching a PROVACS without parameters
>>
>>As I've already said the CALL GIANLUCA.PROVACS('AA') works.
>>
>>The problem is with the question mark ? that doesn't seem to be recognized
>>as a parameter. this is strange as from jdbc we use ? with no problem
>>
>>Do you know how can I use named parameters
>>
>>Many thanks 
>>
>>Best regards
>>
>>
>>  
>>
> Ok, I would suggest that the problem lies with the DB2 driver then, I 
> can't tell from the log if mono has previously bound a parameter, but 
> normally it should be allowed to call SQLPrepare before binding the 
> parameters. It may be a restriction of the driver you have. I would 
> suggest asking IBM if this is a restriction of their driver.
> 
> 
> -- 
> Nick
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
> 
> 


As you can see from above the firs thing that Mono does is to do a
SQLPrepare (SQLPrepareW), as you can also see from the log I switch the Mono
log on:

 MONO_LOG_LEVEL=debug mono helloODBCCommand.exe Dunkel siapbn ...
...

Mono-INFO: Searching for 'SQLFreeHandle'.
Mono-INFO: Probing 'SQLFreeHandleW'.
Mono-INFO: Probing 'SQLFreeHandleW'.
Mono-INFO: Probing 'SQLFreeHandle'.
Mono-INFO: Found as 'SQLFreeHandle'.
Eseguo:{CALL GIANLUCA.PRovacs( ? )}
ExecuteNonQuery
ExecSQL.Parameters.Count:1
Just before Prepare
Mono-INFO: DllImport attempting to load: 'libodbc.so'.
Mono-INFO: DllImport loading location: 'libodbc.so.so'.
Mono-INFO: DllImport error loading library: 'libodbc.so.so: impossibile
aprire il file oggetto condiviso: Nessun file o directory'.
Mono-INFO: DllImport loading library: './libodbc.so.so'.
Mono-INFO: DllImport error loading library './libodbc.so.so: impossibile
aprire il file oggetto condiviso: Nessun file o directory'.
Mono-INFO: DllImport loading: 'libodbc.so'.
Mono-INFO: Searching for 'SQLPrepare'.
Mono-INFO: Probing 'SQLPrepareW'.
Mono-INFO: Found as 'SQLPrepareW'.
OdbcCommand.Prepare: begins!
OdbcCommand.Prepare: Just before libodbc.SQLPrepare
OdbcCommand.Prepare: Just after libodbc.SQLPrepare
OdbcCommand.Prepare: Throwing connection.CreateOdbcException
Mono-INFO: DllImport attempting to load: 'libodbc.so'.
Mono-INFO: DllImport loading location: 'libodbc.so.so'.
Mono-INFO: DllImport error loading library: 'libodbc.so.so: impossibile
aprire il file oggetto condiviso: Nessun file o directory'.
Mono-INFO: DllImport loading library: './libodbc.so.so'.
Mono-INFO: DllImport error loading library './libodbc.so.so: impossibile
aprire il file oggetto condiviso: Nessun file o directory'.
Mono-INFO: DllImport loading: 'libodbc.so'.
Mono-INFO: Searching for 'SQLError'.
Mono-INFO: Probing 'SQLErrorW'.
Mono-INFO: Found as 'SQLErrorW'.
Mono-INFO: DllImport attempting to load: 'libodbc.so'.
Mono-INFO: DllImport loading location: 'libodbc.so.so'.
Mono-INFO: DllImport error loading library: 'libodbc.so.so: impossibile
aprire il file oggetto condiviso: Nessun file o directory'.

-- 
View this message in context: http://www.nabble.com/inputOutput-parameter-problem-in-calling-stored-Procedure-tp22002537p22034816.html
Sent from the unixODBC - Support mailing list archive at Nabble.com.



More information about the unixODBC-support mailing list