validation message using column label, not column name

win2k / pb8.01

When I forget to enter a required value on a dw, I get a MessageBox like
this

Required value missing for COLUMN NAME on row N
Please enter  a value

For legacy reasons my column name is called lineval and can't be changed
I have set a column label in the datawindow painter to "Line Value" which
would look a lot nicer in an error message.

Is there anyway to specify in the dw to use the column label instead of the
column name in the error message ?

thanks

Alex



0
Alex
9/26/2002 10:21:14 PM
sybase.powerbuilder.general 62418 articles. 15 followers. Follow

4 Replies
674 Views

Similar Articles

[PageSpeed] 6

Well that's not a PB-generated error, so it must be in your code somewhere
(or the PFC code if you're using it).  Do a search for the text and find the
code, then change it to look at the label (assuming you use some sort of
naming convention, eg label name = column name + "_t")

--
All views expressed in this message are my own and not necessarily those of
my employer


"Alex" <noreply@newsgroup.invalid> wrote in message
news:l$ZUF0aZCHA.77@forums.sybase.com...
> win2k / pb8.01
>
> When I forget to enter a required value on a dw, I get a MessageBox like
> this
>
> Required value missing for COLUMN NAME on row N
> Please enter  a value
>
> For legacy reasons my column name is called lineval and can't be changed
> I have set a column label in the datawindow painter to "Line Value" which
> would look a lot nicer in an error message.
>
> Is there anyway to specify in the dw to use the column label instead of
the
> column name in the error message ?
>
> thanks
>
> Alex
>
>
>


0
Simon
9/27/2002 11:34:48 AM
Simon just made me think of something (not unusual for Simon to do
<G>). I believe that in most cases, PFC may already be looking for an
object for (column_name + "-t") (there's a way to override the suffix
used), and if it can't find the label object, it just uses the column
name. In a lot of cases I see, the column name ends up being used when
the text objects are left unnamed (which IIRC happens when you add
columns after the initial datawindow creation). The fix may be as
simple (but labour intensive) as making sure all your text objects are
named appropriately.

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten

On Fri, 27 Sep 2002 12:34:48 +0100, "Simon Caldwell [TeamSybase]"
<simonDOTcaldwellATbigfootDOTcom> wrote:

>Well that's not a PB-generated error, so it must be in your code somewhere
>(or the PFC code if you're using it).  Do a search for the text and find the
>code, then change it to look at the label (assuming you use some sort of
>naming convention, eg label name = column name + "_t")


Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a PowerBuilder Developer's Toolkit. 
Version 2.1.01 now available at the Sandbox
^ ^
o o
=*=
0
Terry
9/27/2002 1:30:35 PM
Thanks for your ideas, this is what I have gone with
this code goes in pfc_checkrequirederror event of u_dw in the pfemain.pbl

==============================================

// EVENT:  pfc_checkrequirederror
//
// DESC:  Replace column name with more suitable columnname
//
// CHANGES:
// 30/09/02 AR - Replace column name with more suitable columnname
//

string ls_displayname

// Use text from columnname with _t as suffix if it exists
ls_displayname = this.describe(as_columnname + "_t.text");

If Len(ls_displayname) > 0 And ls_displayname <> '!' And ls_displayname <>
'?' Then
 as_columnname = ls_displayname;
End If

Return 1;

========================================

"Alex" <noreply@newsgroup.invalid> wrote in message
news:l$ZUF0aZCHA.77@forums.sybase.com...
> win2k / pb8.01
>
> When I forget to enter a required value on a dw, I get a MessageBox like
> this
>
> Required value missing for COLUMN NAME on row N
> Please enter  a value
>
> For legacy reasons my column name is called lineval and can't be changed
> I have set a column label in the datawindow painter to "Line Value" which
> would look a lot nicer in an error message.
>
> Is there anyway to specify in the dw to use the column label instead of
the
> column name in the error message ?
>
> thanks
>
> Alex
>
>
>


0
Alex
9/29/2002 11:34:38 PM
Terry

As far as I know, the PFC code that puts out the error message for missing
required columns is on of_checkrequired in u_dw.  And yes, the fall back
position appears to be to use the column name in the message.

--
Andrew Linn
Software Engineering Consultant
Daniel Systems Australia

"Terry Voth" <sequel@techno-kitten.com> wrote in message
news:t3n8pu44o2thhs8da39c352db0aj7rbbuq@4ax.com...
> Simon just made me think of something (not unusual for Simon to do
> <G>). I believe that in most cases, PFC may already be looking for an
> object for (column_name + "-t") (there's a way to override the suffix
> used), and if it can't find the label object, it just uses the column
> name. In a lot of cases I see, the column name ends up being used when
> the text objects are left unnamed (which IIRC happens when you add
> columns after the initial datawindow creation). The fix may be as
> simple (but labour intensive) as making sure all your text objects are
> named appropriately.
>
> Good luck,
>
> Terry [TeamSybase] and Sequel the techno-kitten
>
> On Fri, 27 Sep 2002 12:34:48 +0100, "Simon Caldwell [TeamSybase]"
> <simonDOTcaldwellATbigfootDOTcom> wrote:
>
> >Well that's not a PB-generated error, so it must be in your code
somewhere
> >(or the PFC code if you're using it).  Do a search for the text and find
the
> >code, then change it to look at the label (assuming you use some sort of
> >naming convention, eg label name = column name + "_t")
>
>
> Sequel's Sandbox: http://www.techno-kitten.com
> Home of PBL Peeper, a PowerBuilder Developer's Toolkit.
> Version 2.1.01 now available at the Sandbox
> ^ ^
> o o
> =*=


0
Andrew
9/30/2002 12:20:40 AM
Reply:

Similar Artilces:

How to use a full column name (table name and column name) with a DataReader
Hi, I have a problem retrieving the data with a DataReader from a stored proc that performs a join of two table with the same column's names but different data. Let me explain with an example: I have two tables: Table1: Id, Name Table2: Id, Name, IdTable1 The sproc is something like this: CREATE PROCEDURE [dbo].[SearchByName] (@Name nvarchar(40)) AS BEGIN SELECT * FROM dbo.Table1, dbo.Table2 WHERE Table1.Id = Table2.IdTable1 AND Table1.Name LIKE '%' + @Name + '%' END And my c# code is something like this: Database db = Databas...

DW Designer Column Name vs. Database Column name use in expressions
Can you access the DW Designer column name in expressions (I have used the database column name, but have had no luck figuring out how to access the Designer column name). thanks, David I'm not sure you can. What are you trying to accomplish? There might be another way of doing it. Regards, Dave Fish Sybase TechWave 2005! www.sybase.com/techwave Download an evaluation version of DataWindow .NET 1.5 Today!: www.sybase.com/datawindow.net DataWindow.NET code examples available on CodeXchange: http://datawindownet.codexchange.sybase.com PowerBuilder 10.5 Bet...

Searching all columns without using column name
Hi, I am developing a search engine for my application and I need to grab the entire row from the table if I found the search field in any of the columns and the search is not defined to one table. Please let me know how to search all columns in table without using column names indivdually. If the data is in a DataSet, you can access rows and columns using indexes: myDS.Tables[0].Rows[0][0] will get the first row, first column. .Rows and .Columns have a .Count property that can allow you to get all columns and rows: if ( myDS.Tables.Count>0 ) { for ( int loop...

Get Column Number Using Column Name
This ones burning me because, I am sure i've done it before and It's simply slipping my mind. I need to be able to get a column number using the column name. i.e. Column name = 'effective_date'. Using effective date - get the column number that belongs to effective date. Any help is appreciated!! Thanks!! William dw.Describe("effective_date.ID") Good Luck Michael Walker Cascadia Software William_Shiers wrote: > This ones burning me because, I am sure i've done it before and It's simply > slipping my mind. > ...

validation columns against column
Hi  Do anybody know some articles or codeexample of how to validate columns against a input Column. B can be > A and B can be < C. If you in row ID write 55 for Column_B, it must be reject.example:ID        column_A  Column_B   Column_C1              3               10             152         &...

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...

How to place in DataGrids’s first column table’s column name, in second Datagrid’s column table’s column value?
Hello I use C#. I’m interesting are there samples solved my problem. Andrew. You will need to loop through the datasource of the datagrid or through the datagrid items and fetch the values for the second datagrid.Sonu Kapoor [MVP] Feel free to ask me any .NET question | Ajax Data Controls Forum Thank you! I solved my problem at the server cite. Andrew. ...

[*-)]how to delete all columns except one column for the corresponding column name......?
hi friends,          i've a table with (columns) username, content,data,........... i need to delete all column names(i.e.,content,data,........) except username for the specified username. eg: consider username=mahendran. i've to delete the values in the content,data,...............for the username=mahendran. but username should exist.how to do that?pls help me......  ---------------------------------------------------Don't forget to "Mark as Answer" if you are satisfied. Use the following  DataTable.Columns.Rem...

SqlBulkCopy: the locale id '0' of the source column '<column name> ' and the locale id '1033' of the destination column '<column name>' do not match.
Hi, I am using the sqlbulkcopy object to transfer large amount of data from one SQL server to Other. The code look like this.. SqlDataReader readerSrc = null;SqlBulkCopy bulkCopy = new SqlBulkCopy(connDest);//Prepare Destination Table.SqlCommand cmdDelete = new SqlCommand("DELETE FROM " + destTableName, connDest);//Set the sqlcommand textSqlCommand cmdGet = new SqlCommand("SELECT * FROM " + srcTableName, connSrc);//Open source connection.connSrc.Open();//Open destination connection.connDest.Open();int delete = cmdDelete.ExecuteNonQuery();//Get the data.readerSrc = cmdGet.ExecuteRead...

How to set visible property of Gridview columns using column name instead of index
How to  set visible property of Gridview  columns using column name instead of index Dear janacpp, the columns collection of gridview has no indexer for column name. So you can do something like that:  in your code section you want to set the visible property add this code : GridView1.Columns[GridView1.Columns.IndexOf(GetField("FieldName"))].Visible=false;  where FieldName is the name of your field. and add this function:DataControlField GetField(string name) {DataControlFieldCollection fields = GridView1.Columns.CloneFields();for (int i = 0; i < f...

Use DataBinder.Eval(Object, String) Method with the column index, not the column's name
I can save a lot of processing if I can use the Column Index instead of the Column Name: <%#DataBinder.Eval(CType(Container, DataGridItem).DataItem, <Column Index number here instead>)%>  Is it possible? then you can directly use <%# Container.DataItem(0)%>, <%# Container.DataItem(1)%> Raghu(MCSD.NET, MCAD.NET, MCDBA)[Don't forget to click on Mark as answer on the post that helped you ] Thanks Raghu ! I did not realise that "Container" refered to the DataSource like that. Raghu, do you know how to get the name of the column from <%# Cont...

Need query to get distinct column name and details based on that column using sql server 2000
hi, iam having three tables as shown below table 1                                                      table 2                                     &...

How? : Using a varchar, text data type Variable as valid column name.
Cannot use dynamic sql in current context. So need some help regarding this.I am developing a stored procedure to update a table. Sending Column names as parameters, but not able to use them as given below.INSERT INTO Books (@Column1, @Column2) values.. Any way to execute without using dynamic sql?..Thanx.   Aseem \../ (-_-) \./ Gautam"You Dont know when the end is, But its Coming Fast" You have to use Dynamic SQL, but you can do it within your stored proc via sp_executesql  http://msdn.microsoft.com/en-us/library/ms188001.aspx   Nick  ...

Get Name of DW Identity Column (column.identity property requires looping thru all columns)
I need to locate the identity column for a DW. Only method i see is use of the columnName.Idenity property - which requires you to traverse all the DW columns and then look up the identity property for each until one is yes. Is there a way just to get the identity column directly - or the Primary Key. thanks, Dave As one can see in he syntax, sorry no. I played around with it this week also as I am using DW.Net2.0 with DataSets and a DataSet can not create update commands from a SQL statements where one has 2 tables. But, now, with the help of DW.Net it can do it ...

Web resources about - validation message using column label, not column name - sybase.powerbuilder.general

Cross-validation (statistics) - Wikipedia, the free encyclopedia
is a model validation technique for assessing how the results of a statistical analysis will generalize to an independent data set. It is mainly ...

Serena Williams eyes history, Caroline Wozniacki craves validation in women's US Open final
As Serena Williams eyes another slice of tennis history, Caroline Wozniacki is craving validation with a watershed US Open final triumph on Sunday ...

Travers Duncan asks High Court to strike down ICAC validation laws
ICAC could be sent back to the High Court as a challenge to new laws validating corruption findings looms.

Adam Scott proclaims Texas win as validation of No.1 ranking
... No.1 golfer, beating American Jason Dufner in the third hole of a play-off at the Colonial event. "It's a good feeling and maybe some validation ...

Hollande to sign gay marriage bill after Constitutional Council's validation
Hollande to sign gay marriage bill after Constitutional Council's validation People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, ...

Marketers, Get Ready for the 'Validation Era'
The public brands included has been engaging in a "friends" arms race. But there are signs that we know we overdid it.

Validation and Uncertainty
What an extraordinary conversation I had recently on Twitter. It started with Neil Killick’s statement that we should not consider our stories ...

Nvidia Icera 410 LTE Modem Passes AT&T Network Validation
... Today's news is a small step and logical precursor toward both goals, Nvidia's Icera 410 LTE and HSPA+ baseband has passed AT&T's network validation ...

Ting’s Q1 Subscriber Growth Suffers from Sprint’s New Unlocking Validation Process
Back in February, Sprint updated the process it uses to validate unlocked devices that customers want to utilize on other carriers or one of ...

[Android M Feature Spotlight] Stricter APK Validation Now Actually Checks If All Of An APK's Files Are ...
While you might file this one under "really? We weren't doing this already?" if you're a security expert, Google has added stricter validation ...

Resources last updated: 12/30/2015 5:55:02 AM