string padding

We=92re using PowerBuilder 10 (build 8011) and connecting to
Microsoft SQL Server 2000 via ODBC.  To prevent VARCHAR
fields from being padded with spaces, we added the following
lines to our pbodb100.ini file:



PBTrimCatCharColumns=3d'YES'

PBUseProcOwner=3d'YES'



This works fine with DataWindows and embedded SQL, but
VARCHAR values returned by reference as input/output
parameters to stored procedures called via RPC are still
being padded with spaces or truncated to match the length of
the input parameter.  For example, if we have a stored
procedure foo, created as follows:



----- Procedure foo -----

CREATE PROCEDURE dbo.foo

   @parm VARCHAR(10) OUTPUT

AS

   SELECT @parm =3d =91foo=92

----- End -----



and we=92ve declared it in the transaction object as
follows:



///// Local external function declarations in transaction
object /////

Function Long foo(Ref String parm) RPCFUNC ALIAS FOR
"dbo.foo"

///// End /////



then the following PowerScript code:



///// PowerScript code /////

String bar =3d "xy"

SQLCA.foo(bar)

///// End /////



sets the variable bar to =93fo=94 rather than =93foo=94. 
How can we prevent output parameters from being truncated or
padded? Any suggestions how to solve this?
0
Yakov
1/18/2006 10:55:55 PM
sybase.powerbuilder.connection 3893 articles. 0 followers. Follow

1 Replies
719 Views

Similar Articles

[PageSpeed] 9
Get it on Google Play
Get it on Apple App Store

Truncation is a coding error on your part - the memory needs to be
allocated prior to the call to the RPC.  You're lucky if truncation is
the result, it could also crash the program.

The padding shouldn't happen, but it wouldn't surprise me if this were
an aspect that wasn't addressed through the implementation of the
PBTrimCharColumns functionality.  The obvious solution is to simply
use the Trim() function on the result, but I'd consider this a bug
that should be reported to Sybase.

On 18 Jan 2006 14:55:55 -0800, Yakov Baratt wrote:

>We�re using PowerBuilder 10 (build 8011) and connecting to
>Microsoft SQL Server 2000 via ODBC.  To prevent VARCHAR
>fields from being padded with spaces, we added the following
>lines to our pbodb100.ini file:
>
>
>
>PBTrimCatCharColumns='YES'
>
>PBUseProcOwner='YES'
>
>
>
>This works fine with DataWindows and embedded SQL, but
>VARCHAR values returned by reference as input/output
>parameters to stored procedures called via RPC are still
>being padded with spaces or truncated to match the length of
>the input parameter.  For example, if we have a stored
>procedure foo, created as follows:
>
>
>
>----- Procedure foo -----
>
>CREATE PROCEDURE dbo.foo
>
>   @parm VARCHAR(10) OUTPUT
>
>AS
>
>   SELECT @parm = �foo�
>
>----- End -----
>
>
>
>and we�ve declared it in the transaction object as
>follows:
>
>
>
>///// Local external function declarations in transaction
>object /////
>
>Function Long foo(Ref String parm) RPCFUNC ALIAS FOR
>"dbo.foo"
>
>///// End /////
>
>
>
>then the following PowerScript code:
>
>
>
>///// PowerScript code /////
>
>String bar = "xy"
>
>SQLCA.foo(bar)
>
>///// End /////
>
>
>
>sets the variable bar to �fo� rather than �foo�. 
>How can we prevent output parameters from being truncated or
>padded? Any suggestions how to solve this?
0
Jim
1/19/2006 12:58:01 AM
Reply:

Similar Artilces:

Need help translating dbisql connect string to jdbc connect string
I am not very familiar with Sybase database systems and tools, but have managed to install and use "dbisql" to retrieve data from a command line script like this: dbisql @options.conf @readHours.sql > clockPunches.txt The options.conf file looks like this: -c "UID=clockReader;PWD=********;ENG=tkcdb_image-2;DBN=krdb;LINKS=ALL"; I think we are using ASA SQLAnywhere. I have "jconn3.jar" and "jTDS3.jar" in my classpath. The database is running on a server called "image-2", and the the string in the "options.conf"...

Powerbuilder and SQL Server String padding
Hi , We are using SQL Server 2008 with Powerbuilder 11.5 - build 2806 We are facing a lot of problems with strings not getting TRIMMED - CHAR (25) columns come out with spaces for the extra characters - we are using ADO.NET drivers. Is there an SQL Server setting that trims out the extra spaces or is this a known powerbuilder 11.5 issue ? Any help here would be appreciated. Thanks, Jas There is a DBParm TrimSpaces that might help. <jasvinder> wrote in message news:4b22cebf.7352.1681692777@sybase.com... > Hi , > > We are using SQL Server 2008 with Powerb...

app.config connection string not being read
I have a Web app that has a UI Website Project and a DB dataset/db project. I am running SQL Server 2005 Express on my localhost for development purposes. I have the connectionstring for the DB in the DB projects app.config. The site is running perfectly on my localhost, but when I deploy the site to the review server and change the app.config's connectionstring accordingly a connection to the DB cannot be established. I then tried changing all the db names, usernames, password to jibberish in my app.config file on my localhost and running AND THE SITE STILL RAN ON LOCALHOST. For so...

Client Connections and PowerBuilder connections
What do I need to do to my NT box to be able to run a browser from a client machine to run the demo database/tutorial? I am able to run the demo from the NT server itself, but would like to test client connectivity. My client has browser capability. Furthermore, I am anticipating on using Jaguar as a middle tier for accepting communications from PowerBuilder. Jaguar would then take the SQL and pass the information onto a SYBASE SQL Server. I am not even concerned with any of the business logic that may be involved but am more interested in getting Jaguar to be a middle tier while...

Connection from PowerBuilder connects to Internet
We have a client who has experienced a problem I've seen posted on this forum but can't find now. When they connect with our application to SQLAnywhere, they're getting their connect to AOL dialog. They can cancel out and everything works. I remember that it's a problem with their version of the winsock.dll, but I don't remember the recommended solution. Thanks for you help, James Clanton >When they connect with our application to SQLAnywhere, they're getting their >connect to AOL dialog. They can cancel out and everything works. I >rem...

Adding a connection string via IIS Managment Console does not work when using connection string with Enterprise Library.
When deploying an update to our website, we sometimes need to add a connection string for a new database.  We'd like our IT guys (the ones actually doing the deployment) to be able to add the connection string using the IIS Management Console instead of directly editing the XML for web.config.  The problem is that when connection strings are added this way, the providerName attribute is not specified for the connection string.  This typically isn't a problem because I use SqlDataSources in most places on the website and it seems like they default to System.Data.SqlClie...

OLEDB connection to SQL server padding strings with spaces
Is there a way to retrieve character string data from SQL server using OLE DB without the trailing spaces? Powerbuilder 8.03, Sql Server 2000 We have been using Sql Server Native driver (ntwdblib.dll) from the time our company starting programming their one main software package in 1993 using powerbuilder 3. We now want to take advantage of the new SQL server fetchers not accessible from the db-library and are looking at using OLE DB. The main problem we are having is the columns are return with space padding at the end. This makes right justified columns not right justified and op...

Connect to remote server and connection string
 Hi frndsi develop application in which i have to connect to remote machine on the same lan.I have three Computer on Lan iin which main PC has static Ip an othre are connected through it I m deploying my application on main machin and want to access  sql server data base from other PC on the same LAN can any one tell me what are the setting i have to do and also what connection string i have to write plz guid me Thanks in advance and i will not forget to make mark ans to solution         Hi,http://www.connectionstrings.com/Connection string...

maximum string length for a connection string
What is the maximum string length for a connection string? Is there a maximum length for a given value (For example a huge path stored in DBF...;DBF=c:\reallylongpath\db.db;)? I don't see this in the online books. I'm sure it is someplace obvious but I'm not finding it. Thank you. (The version is 9.0.2 running on Windows) Where are you attempting to specify this connection string? I believe that there is a maximum allowable length on a command entered into cmd.exe/command.com or specified in a .bat/.cmd file. "David DeRam" <ns_xxxdderam@prog...

Connection string to connect to .dbf files
I got several .dbf files under eg. C:\Temp\Data I have searched through the connection string format but cannot get it worked: "Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=C:\Temp\Data"; Is this format correct? I also tried to create User DSN "TestData" point to c:\Temp\Data: "dsn=TestData" This connection string did not work neither. Alan Tse <alan_NO_SPAM_pltse@yahoo.com.au> писал(а) в своём письме Mon, 24 Oct 2011 09:44:10 +0400: > "Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=C:\Temp\Data"; W...

Putting this connection into a config connection string
Hi I have as so many others before me built the perfect site that runs 100% locally but when it is uploaded to the server and you try to connect to your online DB it falls over. I know i need to change the connection string, but i have tried nearly every configuration possible and still have no access. I eventually asked my hosting company and they sent me the following script:   string myConnectionString = "Database=<***>; Data Source=mysql16.easycgi.com;User Id=<***>;Password=<***>"; MySqlConnection myConnection = new MySqlConnection(myConnectionStr...

String Builder approach to Connection String
Folks, I am a "hobbyist," which is to say that I am taking my efforts to learn to write good .Net code seriously, but I still have a day job. My hats off to those of you who do make your living at this!! I have been struggling with a connection string problem to get my web application (which works on my XP Pro/IIS5.1 laptop) to work when I push it up on the its web home. The problem is the first part of the absolute address to the Access DB. I know, I know, I should be using SQL. I am aware of the limits and risks with Access, but it will work for the small number of...

Opened connection vs connection string perfomance
Is there a performance hit by using a connection string to open a connection, execute and then close it vs having the connection open as soon as the app initializes. Need to insert a million rows over the course of the day. Thanks If you use Connection pooling (which is enabled by default), then the underlying connection to db is kept open... So generally speaking the only overhead is to pull the connection out from the pool... -Ashish <GG> wrote in message news:41990eed.490.1681692777@sybase.com... > Is there a performance hit by using a connection string to > ...

Increase the connection pool for SQL connection string.
I guess it's 100 by default... we need to up it.... but I can't seem to find how/where. I was under the impression that you could do this in the web.config or possibly in the connection string itself but I'm turning up blank....   Thanks Yeah, it's in the connection string.  You will want to change your MaxPoolSize.  Here is a referenceCommunity Coder here it is http://msdn2.microsoft.com/en-us/library/aa719770(VS.71).aspxCommunity Coder Thanks... couldnt find it for the life of me....

How to Connect Oracle 10g with connection String and SqlDataSource
I want to connect Oracle Database 10g with SQLDataSource to select, update and insert the data and whats the connection string to connect Oracle Database with ASP.net, oledb, Microsoft ODBC or ASP.net ADO   http://www.connectionstrings.com/ Hi Dear, i am also looking for answer of same question.Regards,AvinashPlease don't forget to click "Mark as Answer" on the post that helped you. Refer to this Sub OracleDbList_SelectedIndexChanged(sender As Object, e As EventArgs) If OracleDbList.SelectedIndex <> -1 Then Dim db As String = OracleDbList.SelectedItem.Te...

Web resources about - string padding - sybase.powerbuilder.connection

Optimal asymmetric encryption padding - Wikipedia, the free encyclopedia
and subsequently standardized in PKCS#1 v2 and RFC 2437 . The OAEP algorithm is a form of Feistel network which uses a pair of random oracles ...

Clintonworld is centre of pocket padding universe
Clinton nostalgia is being replaced by Clinton neuralgia.

MP sorry for padding his resume
State Liberal MP David Southwick apologises for misleading personal information on his website.

Former treasurer Peter Costello warns tax reform hard without 'padding' in public opinion, more difficult ...
Peter Costello warns the Government tax reform will be difficult and that it may not have the political capital to pull it off.

Padding and the Contractor
If padding hours is a problem in Biglaw, imagine what would happen if you paid lawyers by the hour.

Contractor Accuses LA Times of Padding Circulation Figures
In 2007, the U.S. Attorney’s office in Brooklyn announced it was ceasing prosecution of Tribune publications Newsday and Hoy for padding circulation ...

That's Not Padding, My Resume's Just Fat
That's Not Padding, My Resume's Just Fat

Recalls: 2013 Ford C-Max Hybrid recalled over lack of roof padding
Filed under: Hybrid , Minivan/Van , Wagon , Recalls , Safety , Ford Ford is recalling 33,021 units of its 2013 C-Max Hybrid not equipped with ...

The truth behind padding your CV
When looking for a job, every little bit counts — as long as it’s true.

Rams, Edward Jones Dome Cover Concrete with Padding After Reggie Bush's Injury - Bleacher Report
On the heels of injuries suffered by San Francisco 49ers running back Reggie Bush and Cleveland Browns quarterback Josh McCown at the Edward ...

Resources last updated: 12/11/2015 1:12:44 AM