FETCH Error : Mismatch between retrieve columns and fetch columns

Hi, everybody
Procedure under gives a FETCH error. I try to get OUTPUT parameters not
result set.
Procedure are of Sybase ASE type and code are stored inside a transaction
(This)

What gives the error : Mismatch between retrieve columns and fetch columns ?
How to get OUTPUT parameters from this procedure ?

DECLARE Melding  PROCEDURE FOR ssp_vi_msg_out
 @ip_session_id      = :id_SessionID ,  //Innparameter
 @ip_nrdbmsg_id     = :ad_MsgID ,   //Innparameter
 @ip_nrdbmsgtype_id    = :ai_TypeID ,   //Innparameter, Resten... retur
parametrene for en melding
 @op_msg_sender     = :ls_SendAvID  OUTPUT,  //ID til den som sendte meld. 3
tegn
 @op_msg_sent_datetime  = :ldt_Sendt  OUTPUT,   //Melding sendt
 @op_msg_received_datetime = :ldt_Motatt  OUTPUT,   //Motatt p� NRDB
 @op_nrdbcase_id     = :ld_CaseID  OUTPUT,   //Case id p� NRDB
 @op_sequence      = :li_SeqNr  OUTPUT,    //SeqNr innenfor ld_CaseID
 @op_auth_ref      = :ls_SendtAv  OUTPUT,   //Bruker som sendte bestilling
 @op_customer_id     = :ls_KundeID  OUTPUT,   //F�dselsnr eller Org.nr til
kunden
 @op_customer_name    = :ls_KundeNavn  OUTPUT,  //Navn p� kunden
 @op_subscr_type     = :ls_SubType  OUTPUT,   //Subscriber type E=enkel nr,
S=serie , T=tilfeldig
 @op_telephonenumber_main = :ls_HovedTelNr  OUTPUT,  //Nr p� hoved telefon
 @op_telephonenumber_add_1 = :ls_EkstraTel1  OUTPUT,  //Ekstra telefon serie
eks. 927354392
 @op_telephonenumber_add_2 = :ls_EkstraTel2  OUTPUT,
 @op_telephonenumber_add_3 = :ls_EkstraTel3  OUTPUT,
 @op_telephonenumber_add_4 = :ls_EkstraTel4  OUTPUT,
 @op_telephonenumber_add_5 = :ls_EkstraTel5  OUTPUT,
 @op_telephonenumber_add_6 = :ls_EkstraTel6  OUTPUT,
 @op_telephonenumber_add_7 = :ls_EkstraTel7  OUTPUT,
 @op_telephonenumber_add_8 = :ls_EkstraTel8  OUTPUT,
 @op_telephonenumber_add_9 = :ls_EkstraTel9  OUTPUT,
 @op_telephonenumber_add_10= :ls_EkstraTel10  OUTPUT,
 @op_vi_operation     = :li_OperNr  OUTPUT,   //Update Operasjon nr i NRDB
eks. vi_operation=1
 @op_impl_datetime    = :ldt_Implementert  OUTPUT, //ferdig inmplementert
dato/tid
 @op_add_services     = :li_EkstraServ  OUTPUT,  //ikke tatt i bruk enn�
 @op_rsp        = :ls_Rsp  OUTPUT,    //Recipient Service Provider
 @op_rtsp       = :ls_Rtsp  OUTPUT,    //Recipient Terminating Service
Provider
 @op_dsp        = :ls_Dsp  OUTPUT,    //Donating Service Provider
 @op_error_code     = :li_FeilNr  OUTPUT,    //Kun for VI_FEIL melding
 @op_error_comment    = :ls_FeilMeld  OUTPUT,   //Kun for VI_FEIL melding
 @op_message      = :ls_FeilTekst  OUTPUT,
 @op_returncode     = :li_Res  OUTPUT
USING This;


EXECUTE Melding;

// Here shows This.SQLNRows=1, SQLCode=0

// Try to get OUTPUT data. INTO lists all OUTPUT parameters in declare
statement
FETCH Melding INTO
:ls_SendAvID,:ldt_Sendt,:ldt_Motatt,:ld_CaseID,:li_SeqNr,:ls_SendtAv,:ls_Kun
deID,:ls_KundeNavn,:ls_SubType,:ls_HovedTelNr,:ls_EkstraTel1,:ls_EkstraTel2,
:ls_EkstraTel3,:ls_EkstraTel4,:ls_EkstraTel5,:ls_EkstraTel6,:ls_EkstraTel7,:
ls_EkstraTel8,:ls_EkstraTel9,:ls_EkstraTel10,:li_OperNr,:ldt_Implementert,:l
i_EkstraServ,:ls_Rsp,:ls_Rtsp,:ls_Dsp,:li_FeilNr,:ls_FeilMeld,:ls_FeilTekst,
:li_Res;
IF This.SQLCode < 0 THEN
    //Here show SQLErrText=Mismatch between retrieve columns and fetch
columns, SQLCode=-1


With Regards
Mirek






0
Mirek
9/30/2002 4:48:13 PM
sybase.powerbuilder.general 62418 articles. 18 followers. Follow

0 Replies
1621 Views

Similar Articles

[PageSpeed] 38

Reply:

Similar Artilces:

'Mismatch between retrieve columns and fetch columns' ERROR
Hi, I am trying to return two resultsets from a stored procedure. I did the following: 1. Declared my dynamic cursor 2. Prepared my SQLSA 3. Open my cursor 4. Fetch the first result set (THIS WORKED) 5. Fetch the second result set. I got the error below: ' Mismatch between retrieve columns and fetch columns ' One of my fetch column is a timestamp (datetime on PowerScript). Could this be the problem? The others are strings, dates, decimal(0). What DBMS are you using ? The Timestamp data type in MSSQL Server is not actually a date time field, so woul...

'Mismatch between retrieve columns and fetch columns' ERROR
Hi, I am trying to return two resultsets from a stored procedure. I did the following: 1. Declared my dynamic cursor 2. Prepared my SQLSA 3. Open my cursor 4. Fetch the first result set (THIS WORKED) 5. Fetch the second result set. I got the error below: ' Mismatch between retrieve columns and fetch columns ' One of my fetch column is a timestamp (datetime on PowerScript). Could this be the problem? The others are strings, dates, decimal(0). Could be because usually the second result set in PB is reserved for return value and output parms. Try fetching...

mismatch between retrieve columns and fetch columns
Hi, I think I'm looking for an explanation rather than a solution here. In migrating code from 6.5 to 11.5 I found some embedded SQL where the cursor declaration had 3 columns but the fetch had 4 columns. This seems to work fine under 6.5, connecting to SQL Server via MSS, it just nulls the 4th column in the Fetch. However in 11.5 connecting via SNC I get the "mismatch between retrieve columns and fetch columns" error. The obvious solution is just to fix the code which I will do but I'm curious as to whether there's a DBParm or database setting that I can us...

Mismatch between retrieve columns and fetch columns
In a function I wrote dynamic SQL statement to fetch data into variable. When a large no of user call that function, it prompted 'Mismatch between retrieve columns and fetch columns' in sqlerrtext. It will not prompt when less user using the function. Please advice. Database Oracle 8.1.6 PB 7 build 10077 OS win2k Thanks Are you using the 8.0 OCI drivers? They have issues under load. Try using the 7.x drivers. Carson ___________________________________________________________ Carson Hager Team Sybase Cynergy Systems, Inc. Sybase Enterprise Applicat...

Mismatch between retrieve columns and fetch columns #2
Environment: PowerBuilder 10.2.1 (9731) EA Server 5.5 (13993) ASE 12.5.3 Using dynamic SQL. When attempting to select a single char(8) column into a local string variable from a single row in the database (using a connection cache, I've tried both CT-Lib and JDBC), I get the "Mismatch" message, even with a single user. Any suggestions? Best Regards A little more information... The node that is hosting the EA Server 5.5 referenced below is a Win2K Server. I installed EAS 5.5 on my WinXP Pro laptop as well as an old Win2K Pro workstation. Funny th...

'Mismatch between retrieve columns and fetch columns'
In a function I wrote dynamic SQL statement to fetch data into variable. When a large no of user call that function, it prompted 'Mismatch between retrieve columns and fetch columns' in sqlerrtext. It will not prompt when less user using the function. Please advice. Database Oracle 8.1.6 PB 7 build 10077 OS win2k Thanks This indicates that another user has modified the row already. Are you expecting the same row to be updateable by more than one user at a time? /ck "Tony Lim" <tony_lim@hotmail.com> wrote in message news:xh45lsm9BHA.196@forums...

'Mismatch between retrieve columns and fetch columns'
In a function I wrote dynamic SQL statement to fetch data into variable. When a large no of user call that function, it prompted 'Mismatch between retrieve columns and fetch columns' in sqlerrtext. It will not prompt when less user using the function. Please advice. Database Oracle 8.1.6 PB 7 build 10077 OS win2k Thanks is the datatype of the retrieve and fetch are matching??? check your dbparm parameter too vision_unlimited@comcast.net "Tony Lim" <tongchang@hotmail.com> wrote in message news:GuC4ftm9BHA.290@forums.sybase.com... > In ...

PB 11.1 MSQL 2K Stored procedure OUTPUT
Hi All! After some problem with DBError not triggering we updated to 11.1. Now the triggering works, however no we got problem using OUTPUT in a previous working Stored procedure (MSSQL). EXEC from ISQL painter works fine, however trying to fetch the output using embedded sql fails. It works for other SPs. And this SP call did work prior updating to 11.1. The error is: "Mismatch between retrieve columns and fetch columns" The SP looks like (note only the last parameter is required) CREATE procedure dbo.UseropLog_Add @UseropId int, @UseropReqId int=null, @Us...

how to fetch column using column index in sql server.
Hi, I have several columns in my table, but I want to fetch data using column index instead of column name in select  command. is there any way to do this.Please remember to click “Mark as Answer” on the post that helps youJasim AkhtarNew Delhi ( INDIA ) Yes there is.It's called dynamic SQL and it's a complicated process.See http://www.sommarskog.se/dynamic_sql.html Please click "Mark as Answer" if my reply solved your problem.CheersRammohan...

When is a column not a column?
I have several extremely similar datawindows that I have to maintain that go against the same table. Recently, I had to add a column to that table, and also add the column to ALL of these datawindows that go against this table. I added the column to the first datawindow, set up the edit control style, etc. I then did a copy/paste of the columns edit control to the remaining dw's (of course remembering to first add the column in SQL). Everything (update props, column specs, column props) seems to indicate that the pasted column is linked to the column I selected, HOWEVER, when I...

Error by fetching row with more than 199 chars in a column.
Hi, I try to open a recordset with a server side keyset driven cursor and get an exception by fetching the second row wich has more than 199 chars in a column. Has anyone the same effect? Is this a sybase driver bug? I use ASA 8.01 EBF 3044 and ADO 2.7. Here is my code: CREATE TABLE "DBA"."DIV" ( "DIV_ID" integer NOT NULL DEFAULT autoincrement, "DIV_Data" char(600) NULL, PRIMARY KEY ("DIV_ID") ) insert into div (div_data) values (repeat('1234567890', 21)); insert into div (div_data) values (repeat('123...

fetch next,fetch prior,fetch last,fetch first
i want to know how many databases can support above dml statements? any suggestion is useful! Any database that follows SQL/92 or SQL/99 should support this. -- Chris Keating Sybase Adaptive Server Anywhere Professional Version 8 iAnywhere Solutions http://www.iAnywhere.com ** Please only post to the newsgroup ** Whitepapers can be found at http://www.iAnywhere.com/developer ** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm ** Use CaseXpress to report bugs http://casexpress.sybase.com <kingdomzhf> wrote in message news:D787F9ED7D092C87003ECAB485...

Datawindow gives 'fetched column value was truncated' error
Hello While retrieving a datawindow on Windows XP machine, PB version 9.01.Build 7204,Oracle ODBC driver (10.01.00.31) against Oracle Database (version 10.1.0.2.0), I get the following error. [Oracle][ODBC][Ora]ORA-01406: fetched column value was truncated (1406) The same datawindow works correctly if I add an order by clause to the sql. Also if I connect to same database using ODBC driver version 9.02.00.00 and run the original query, it works without any error. Has anyone got a clue why this could be happening? If not where will I be able to find information on this. Rega...

how to retrieve value for a column from other column that has relationship?
Hi all, I'm a new asp.net learner. I've been trying this all days, but can't get this working. I have a Categories table that has these columns: CategoryID, CategoryName, CategoryParentID Sample of records: CategoryID CategoryName CategoryParentID 1 Drink <NULL> 2 Food <NULL> 3 Energy Drink 1 4 Frozen Food 2 I am making the "edit category" for admin. using dat...

Web resources about - FETCH Error : Mismatch between retrieve columns and fetch columns - sybase.powerbuilder.general

Spatial mismatch - Wikipedia, the free encyclopedia
Spatial mismatch is the mismatch between where low-income households reside and where suitable job opportunities are available. In its original ...

Skills mismatch behind youth jobless: B20
Making graduates more attractive to employers is key to reducing youth unemployment, a conference heard today.

Retirement dreams a mismatch with savings reality
Australians have unrealistic expectations about the lifestyle they will be able to afford in retirement.

The perfect mismatch
The perfect mismatch

Newcastle Next: Powerful mismatch of architectural styles
WILL Newcastle be all that different from the Newcastle we see now, or the one 100 years ago?

Soccer mismatch
Dutch scientists claim that mistakes are inevitable when assistant referees are judging whether soccer players are offside or not. Raôul R. ...

Free to play iOS game marketing cost ‘mismatch is insane’
Free-to-play iOS game makers say the mismatch is “insane” between what it costs to acquire a new customer and how much revenue they’ll get through ...

Skills mismatch or ‘labour market failure’? Canada’s newcomer conundrum
In the past seven years, the number of people brought to Canada to do a job and then leave has eclipsed the number of people moving here annually ...

PBO: Canada's Labour Shortage, Skills Mismatch Don't Seem To Exist
OTTAWA - Canada's budget watchdog says there's little evidence of serious labour shortages or a skills mismatch problem in the country.The finding ...

Mismatch
... itself. The company treats the stores as a sales channel but also as a communications channel with its customers. A complete and total mismatch. ...

Resources last updated: 1/18/2016 4:19:41 PM