Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

ODBC Error while retrieving an ddw with arguments

4 posts in General Discussion (old) Last posting was on 2000-03-01 22:15:36.0Z
Jorge Luzarraga C. Posted on 2000-03-01 14:38:07.0Z
Newsgroups: sybase.public.easerver
From: "Jorge Luzarraga C." <jluzarra@alboradasystems.com>
Subject: ODBC Error while retrieving an ddw with arguments
Date: Wed, 1 Mar 2000 09:38:07 -0500
Lines: 66
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 209.170.68.205
Message-ID: <347_GAfzT94g$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27430
Article PK: 158833

Hi guys,

I've been working on a HTML Datawindow, and I'm customizing the
HTMLGenerator component in order to load several ddw's with argument. The
code that does this task is the following:
Method retrieve2; parameters:column, param, dbms, dbparm
integer li_result, li_result2, li_result3
DataWindowChild ldwc
integer li_tr

if not ib_fixed then
trns.DBMS = DBMS
trns.DBParm = DBParm
trns.Lock = ""
trns.LogID = ""
trns.LogPass = ""
trns.Database = ""
trns.ServerName = ""

li_result3 = ids_datastore.SetTrans(trns)
else
li_result3 = -1
end if

if ib_trace then of_log_enter("Retrieve2()")

if (column <> "") then
li_result2 = ids_datastore.GetChild(column,ldwc)
li_result3 = ldwc.SetTrans(trns)
of_log("li_result3 dwchild:"+String(li_result3) );

li_result = ldwc.Retrieve(trim(param))

ldwc.insertRow(0)
of_log("Result from GetChild:"+String(li_result2))
end if

if ib_trace then
if (li_result < 0) then
of_log("Retrieve Failed, DB message below")
of_log(ids_datastore.GetLastErrorString());
end if
of_log_exit("Retrieve() = " + String(li_result))
end if

of_continueWork (TRUE)

return li_result


But whenever I get the retrieve statement I got this error on the Jaguar
Machine:

Select Error: SQLState=22005
[Microsoft][ODBC SQL Server Driver] Invalid Character value for cast
specification

Please, any advice you could give would greatly appreciated.
TIA
--
Ing. Jorge Luzarraga C.
Analista de Sistemas
Alborada Systems, S.A.
www.alboradasystems.com


Ryan Lubke Posted on 2000-03-01 20:04:42.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 01 Mar 2000 15:04:42 -0500
From: Ryan Lubke <rlubke@sybase.com>
Organization: I have none...
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.7 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: ODBC Error while retrieving an ddw with arguments
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 16
NNTP-Posting-Host: citadel.sybase.com 157.133.125.41
Message-ID: <347_38BD77DA.8A2413FD@sybase.com>
References: <347_GAfzT94g$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27403
Article PK: 158808

Hello Jorge,

I don't know what you're setting DBParm to, so this is just a
suggestion.

Try adding StripParmNames='Yes' to your DBParm and try it again.

This above suggestion only really applies to DW's that use
StoredProcedures as the datasource. Basically what is happening is the
parameter names are being passed when they shouldn't be so this will
strip those names.

Regards,

Ryan Lubke
--
_______________________________________________________________
Ryan Lubke Technical Support Engineer Phone: 800-879-2273
Sybase Inc, Burlington MA Fax : 781-564-6148


Jorge Luzarraga C. Posted on 2000-03-01 21:03:13.0Z
Newsgroups: sybase.public.easerver
From: "Jorge Luzarraga C." <jluzarra@alboradasystems.com>
Subject: Re: ODBC Error while retrieving an ddw with arguments
Date: Wed, 1 Mar 2000 16:03:13 -0500
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 209.170.68.205
Message-ID: <347_sD49gU8g$GA.295@forums.sybase.com>
References: <347_GAfzT94g$GA.201@forums.sybase.com> <347_38BD77DA.8A2413FD@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27392
Article PK: 158796

Ryan, thank you for your answer, I tried it and I'm still getting the same
error. My datawindow has a manual result set and several ddw's with sp
datasources that request parameters.

My dbparm is :
retVal2 = dwMine.retrieve2('tipprd','00640',
"ODBC","ConnectString='DSN=myprofile;UID=user;PWD=password;StripParmNames=Ye
s'");

the method's parameters are
1)column from dw object
2)parameter for ddw
3)dbms for the ddw
4)dbparm for the ddw

Ryan Lubke <rlubke@sybase.com> wrote in message
news:38BD77DA.8A2413FD@sybase.com...
> Hello Jorge,
>
> I don't know what you're setting DBParm to, so this is just a
> suggestion.
>
> Try adding StripParmNames='Yes' to your DBParm and try it again.
>
> This above suggestion only really applies to DW's that use
> StoredProcedures as the datasource. Basically what is happening is the
> parameter names are being passed when they shouldn't be so this will
> strip those names.
>
> Regards,
>
> Ryan Lubke
> --
> _______________________________________________________________
> Ryan Lubke Technical Support Engineer Phone: 800-879-2273
> Sybase Inc, Burlington MA Fax : 781-564-6148


Jim O'Neil [Sybase] Posted on 2000-03-01 22:15:36.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 01 Mar 2000 17:15:36 -0500
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: ODBC Error while retrieving an ddw with arguments
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 43
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38BD9688.45DABB71@sybase.com>
References: <347_GAfzT94g$GA.201@forums.sybase.com> <347_38BD77DA.8A2413FD@sybase.com> <347_sD49gU8g$GA.295@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27382
Article PK: 158785

You did not set the parameter correctly. StripParmNames is a DBParm (understood
only by PowerBuilder) NOT a ConnectString option (understood only by the ODBC
driver), try this:

retVal2 = dwMine.retrieve2('tipprd','00640',
"ODBC","ConnectString='DSN=myprofile;UID=user;PWD=password;',StripParmNames=Yes");

--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc

"Jorge Luzarraga C." wrote:

> Ryan, thank you for your answer, I tried it and I'm still getting the same
> error. My datawindow has a manual result set and several ddw's with sp
> datasources that request parameters.
>
> My dbparm is :
> retVal2 = dwMine.retrieve2('tipprd','00640',
> "ODBC","ConnectString='DSN=myprofile;UID=user;PWD=password;StripParmNames=Ye
> s'");
>
> the method's parameters are
> 1)column from dw object
> 2)parameter for ddw
> 3)dbms for the ddw
> 4)dbparm for the ddw
>
> Ryan Lubke <rlubke@sybase.com> wrote in message
> news:38BD77DA.8A2413FD@sybase.com...
> > Hello Jorge,
> >
> > I don't know what you're setting DBParm to, so this is just a
> > suggestion.
> >
> > Try adding StripParmNames='Yes' to your DBParm and try it again.
> >
> > This above suggestion only really applies to DW's that use
> > StoredProcedures as the datasource. Basically what is happening is the
> > parameter names are being passed when they shouldn't be so this will
> > strip those names.
> >
> > Regards,
> >
> > Ryan Lubke
> > --
> > _______________________________________________________________
> > Ryan Lubke Technical Support Engineer Phone: 800-879-2273
> > Sybase Inc, Burlington MA Fax : 781-564-6148