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

6 posts in General Discussion (old) Last posting was on 2000-03-09 03:55:00.0Z
Jorge Luzarraga C. Posted on 2000-03-08 19:42:08.0Z
Newsgroups: sybase.public.easerver
From: "Jorge Luzarraga C." <jluzarra@alboradasystems.com>
Subject: ODBC Error
Date: Wed, 8 Mar 2000 14:42:08 -0500
Lines: 30
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_vZIVSoTi$GA.285@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26868
Article PK: 157833

Hello

My friends I still have the error :

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

whenever I try to retrieve a resultset from a web datawindow that receives
parameters, I'm testing it within powerbuilder.The database is Mssqlserver
7.0

the profile for the database connection is:

// Profile odbc connection to as_file
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = True
SQLCA.DBParm = "ConnectString='DSN=as_file;UID=csa;PWD=csa;StripParmNames=
Yes',ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE
,C:\My Documents\web\SQL.LOG'"


Help me, Please!
--
Ing. Jorge Luzarraga C.
Analista de Sistemas
Alborada Systems, S.A.
www.alboradasystems.com


Jim O'Neil [Sybase] Posted on 2000-03-08 20:29:52.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 08 Mar 2000 15:29:52 -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
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 32
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38C6B83F.6A3D5A0E@sybase.com>
References: <347_vZIVSoTi$GA.285@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26864
Article PK: 157830


"Jorge Luzarraga C." wrote:

> Hello
>
> My friends I still have the error :
>
> Select Error: SQLState=22005
> [Microsoft][ODBC SQL Server Driver] Invalid Character value for cast
> specification
>
> whenever I try to retrieve a resultset from a web datawindow that receives
> parameters, I'm testing it within powerbuilder.The database is Mssqlserver
> 7.0
>
> the profile for the database connection is:
>
> // Profile odbc connection to as_file
> SQLCA.DBMS = "ODBC"
> SQLCA.AutoCommit = True
> SQLCA.DBParm = "ConnectString='DSN=as_file;UID=csa;PWD=csa;StripParmNames=
> Yes',ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE
> ,C:\My Documents\web\SQL.LOG'"
>
> Help me, Please!
> --
> Ing. Jorge Luzarraga C.
> Analista de Sistemas
> Alborada Systems, S.A.
> www.alboradasystems.com

StripParmNames is NOT a ConnectString option, i.e., the ODBC driver doesn't
understand it; it's a DBParm of it's own right, like ConnectString... Try

SQLCA.DBParm =
"ConnectString='DSN=as_file;UID=csa;PWD=csa;ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE

,C:\My Documents\web\SQL.LOG',StripParmNames='Yes'"



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


Jorge Luzarraga C. Posted on 2000-03-08 20:44:18.0Z
Newsgroups: sybase.public.easerver
From: "Jorge Luzarraga C." <jluzarra@alboradasystems.com>
Subject: Re: ODBC Error
Date: Wed, 8 Mar 2000 15:44:18 -0500
Lines: 59
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_mLF0$KUi$GA.251@forums.sybase.com>
References: <347_vZIVSoTi$GA.285@forums.sybase.com> <347_38C6B83F.6A3D5A0E@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26861
Article PK: 157826

How Should I put that in the database profile from powerbuilder?

Jim O'Neil [Sybase] <joneil@sybase.com> wrote in message
news:38C6B83F.6A3D5A0E@sybase.com...
> "Jorge Luzarraga C." wrote:
>
> > Hello
> >
> > My friends I still have the error :
> >
> > Select Error: SQLState=22005
> > [Microsoft][ODBC SQL Server Driver] Invalid Character value for cast
> > specification
> >
> > whenever I try to retrieve a resultset from a web datawindow that
receives
> > parameters, I'm testing it within powerbuilder.The database is
Mssqlserver
> > 7.0
> >
> > the profile for the database connection is:
> >
> > // Profile odbc connection to as_file
> > SQLCA.DBMS = "ODBC"
> > SQLCA.AutoCommit = True
> > SQLCA.DBParm =
"ConnectString='DSN=as_file;UID=csa;PWD=csa;StripParmNames=
> >
Yes',ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE
> > ,C:\My Documents\web\SQL.LOG'"
> >
> > Help me, Please!
> > --
> > Ing. Jorge Luzarraga C.
> > Analista de Sistemas
> > Alborada Systems, S.A.
> > www.alboradasystems.com
>
> StripParmNames is NOT a ConnectString option, i.e., the ODBC driver
doesn't
> understand it; it's a DBParm of it's own right, like ConnectString... Try
>
> SQLCA.DBParm =
>

"ConnectString='DSN=as_file;UID=csa;PWD=csa;ConnectOption='SQL_DRIVER_CONNEC
T,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE
>
> ,C:\My Documents\web\SQL.LOG',StripParmNames='Yes'"
>
>
>
> --
> Jim O'Neil
> Senior Technical Support Engineer
> Sybase, Inc
>
>


Jim O'Neil [Sybase] Posted on 2000-03-08 22:07:33.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 08 Mar 2000 17:07:33 -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
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 52
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38C6CF24.39A8D3A5@sybase.com>
References: <347_vZIVSoTi$GA.285@forums.sybase.com> <347_38C6B83F.6A3D5A0E@sybase.com> <347_mLF0$KUi$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26855
Article PK: 157820


"Jorge Luzarraga C." wrote:

> How Should I put that in the database profile from powerbuilder?
>
> Jim O'Neil [Sybase] <joneil@sybase.com> wrote in message
> news:38C6B83F.6A3D5A0E@sybase.com...
> > "Jorge Luzarraga C." wrote:
> >
> > > Hello
> > >
> > > My friends I still have the error :
> > >
> > > Select Error: SQLState=22005
> > > [Microsoft][ODBC SQL Server Driver] Invalid Character value for cast
> > > specification
> > >
> > > whenever I try to retrieve a resultset from a web datawindow that
> receives
> > > parameters, I'm testing it within powerbuilder.The database is
> Mssqlserver
> > > 7.0
> > >
> > > the profile for the database connection is:
> > >
> > > // Profile odbc connection to as_file
> > > SQLCA.DBMS = "ODBC"
> > > SQLCA.AutoCommit = True
> > > SQLCA.DBParm =
> "ConnectString='DSN=as_file;UID=csa;PWD=csa;StripParmNames=
> > >
> Yes',ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE
> > > ,C:\My Documents\web\SQL.LOG'"
> > >
> > > Help me, Please!
> > > --
> > > Ing. Jorge Luzarraga C.
> > > Analista de Sistemas
> > > Alborada Systems, S.A.
> > > www.alboradasystems.com
> >
> > StripParmNames is NOT a ConnectString option, i.e., the ODBC driver
> doesn't
> > understand it; it's a DBParm of it's own right, like ConnectString... Try
> >
> > SQLCA.DBParm =
> >
> "ConnectString='DSN=as_file;UID=csa;PWD=csa;ConnectOption='SQL_DRIVER_CONNEC
> T,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE
> >
> > ,C:\My Documents\web\SQL.LOG',StripParmNames='Yes'"
> >
> >
> >
> > --
> > Jim O'Neil
> > Senior Technical Support Engineer
> > Sybase, Inc
> >
> >

Looks like the example above got chopped, but basically, you pull StripParmNames
OUT of the ConnectString string.

SQLCA.DBParm =
"ConnectString='DSN=as_file;UID=csa;PWD=csa;ConnectOption='SQL_DRIVER_CONNEC
T,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE,C:\My
Documents\web\SQL.LOG',StripParmNames='Yes'"

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


Jorge Luzarraga C. Posted on 2000-03-08 22:11:25.0Z
Newsgroups: sybase.public.easerver
From: "Jorge Luzarraga C." <jluzarra@alboradasystems.com>
Subject: Re: ODBC Error
Date: Wed, 8 Mar 2000 17:11:25 -0500
Lines: 92
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_#mimt7Ui$GA.285@forums.sybase.com>
References: <347_vZIVSoTi$GA.285@forums.sybase.com> <347_38C6B83F.6A3D5A0E@sybase.com> <347_mLF0$KUi$GA.251@forums.sybase.com> <347_38C6CF24.39A8D3A5@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26853
Article PK: 154451

Jim,

Thanks a lot for your help!
It finally worked out from the Powerdynamo script. But I don't how to put
that parameter at the end of connectstring in the powerbuilder profile I'm
creating . I only see a driver-specific parameter blank, but it put in the
middle where you saw it.

Jim O'Neil [Sybase] <joneil@sybase.com> wrote in message
news:38C6CF24.39A8D3A5@sybase.com...
> "Jorge Luzarraga C." wrote:
>
> > How Should I put that in the database profile from powerbuilder?
> >
> > Jim O'Neil [Sybase] <joneil@sybase.com> wrote in message
> > news:38C6B83F.6A3D5A0E@sybase.com...
> > > "Jorge Luzarraga C." wrote:
> > >
> > > > Hello
> > > >
> > > > My friends I still have the error :
> > > >
> > > > Select Error: SQLState=22005
> > > > [Microsoft][ODBC SQL Server Driver] Invalid Character value for cast
> > > > specification
> > > >
> > > > whenever I try to retrieve a resultset from a web datawindow that
> > receives
> > > > parameters, I'm testing it within powerbuilder.The database is
> > Mssqlserver
> > > > 7.0
> > > >
> > > > the profile for the database connection is:
> > > >
> > > > // Profile odbc connection to as_file
> > > > SQLCA.DBMS = "ODBC"
> > > > SQLCA.AutoCommit = True
> > > > SQLCA.DBParm =
> > "ConnectString='DSN=as_file;UID=csa;PWD=csa;StripParmNames=
> > > >
> >
Yes',ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE
> > > > ,C:\My Documents\web\SQL.LOG'"
> > > >
> > > > Help me, Please!
> > > > --
> > > > Ing. Jorge Luzarraga C.
> > > > Analista de Sistemas
> > > > Alborada Systems, S.A.
> > > > www.alboradasystems.com
> > >
> > > StripParmNames is NOT a ConnectString option, i.e., the ODBC driver
> > doesn't
> > > understand it; it's a DBParm of it's own right, like ConnectString...
Try
> > >
> > > SQLCA.DBParm =
> > >
> >
"ConnectString='DSN=as_file;UID=csa;PWD=csa;ConnectOption='SQL_DRIVER_CONNEC
> > T,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE
> > >
> > > ,C:\My Documents\web\SQL.LOG',StripParmNames='Yes'"
> > >
> > >
> > >
> > > --
> > > Jim O'Neil
> > > Senior Technical Support Engineer
> > > Sybase, Inc
> > >
> > >
>
> Looks like the example above got chopped, but basically, you pull
StripParmNames
> OUT of the ConnectString string.
>
> SQLCA.DBParm =
>
"ConnectString='DSN=as_file;UID=csa;PWD=csa;ConnectOption='SQL_DRIVER_CONNEC
> T,SQL_DRIVER_NOPROMPT;SQL_OPT_TRACEFILE,C:\My
> Documents\web\SQL.LOG',StripParmNames='Yes'"
>
> --
> Jim O'Neil
> Senior Technical Support Engineer
> Sybase, Inc
>
>


Jim O'Neil [Sybase] Posted on 2000-03-09 03:55:00.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 08 Mar 2000 22:55:00 -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
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 21
NNTP-Posting-Host: 157.133.176.50
Message-ID: <347_38C72091.A1FB0705@sybase.com>
References: <347_vZIVSoTi$GA.285@forums.sybase.com> <347_38C6B83F.6A3D5A0E@sybase.com> <347_mLF0$KUi$GA.251@forums.sybase.com> <347_38C6CF24.39A8D3A5@sybase.com> <347_#mimt7Ui$GA.285@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26834
Article PK: 157802


"Jorge Luzarraga C." wrote:

> Jim,
>
> Thanks a lot for your help!
> It finally worked out from the Powerdynamo script. But I don't how to put
> that parameter at the end of connectstring in the powerbuilder profile I'm
> creating . I only see a driver-specific parameter blank, but it put in the
> middle where you saw it.
>
> Jim O'Neil [Sybase] <joneil@sybase.com> wrote in message

Right, driver-specific parameters are where you specify what will be passed to
the ODBC driver to process, all the other info on the other tabs are
PowerBuilder DBParms. On the Syntax tab you should see a check box labeled
Strip Parameter Names, that will set the DBParm appropriately and you can cut
and past the resulting syntax from the Preview tab.


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