How can I get the column name of a datawindow column?
I want to get the column name in tablename.columnname format. I have tried
to get it using dbname property. However, I found that it work only if the
tables in the datawindow are inner join. If the tables in the datawindow
are outer join, the dbname only return the columnname and the tablename is
Do you have any idea?
You could add the name to the select clause or to the tag property. Or you
caould check to see if it is a join or not (by seeing if there is a '.' in the
column name) if not then get the sql select statment and parse to find the
table...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]
FROM dbo.Table1, dbo.Table2
WHERE Table1.Id = Table2.IdTable1
AND Table1.Name LIKE '%' + @Name + '%'
And my c# code is something like this:
Database db = Databas...Datawindow Column Name
Is it possible to get a datawindow's column name from it's dbname. I
need do a find on the datawindow using the column name but since our
column names are created dynamically i.e col1, col2 etc i need to find
the corresponding column name to it's dbname.
I'm not getting entirely what you're trying to achieve, but here are some
When you create a datawindow from a SQL Select statement for each of the db
columns from your statement PB generates corresponding DW column (control).
If you observe the Column Specification pane in the Datawindo...Datawindow column names
We have some datawindows that are fairly large (75Kb+), with 220+
columns (there is a lot of Oracle decoding going on) as well as some
computed columns. Every time that we change the SQL statement, the
datawindow painter changes the name of the columns, prefixing the column
names with the table names. What are the rules concerning what type of
change to the datawindow SQL statement causes this to happen? And is
there a way to configure/fool the datawindow painter to stop it from
renaming the columns everytime we modify the SQL?
This is PB5.0.2 on Win95 running against Oracle 7.2.
Than...Datawindow Column Names
Does anyone remember what the dwSyntax command is to return the columns
on a datawindow (in an array format)? I cannot seem to find it in the help.
you can read the source code of f_dw_get_objects in PFC,
or just retrieve columns list by dw.object.datawindow.objects.
Jim Cuoco <email@example.com> wrote in message
> Does anyone remember what the dwSyntax command is to return the
> on a datawindow (in an array format)? I cannot seem to find it in the
>...datawindow column names and multi-table datawindows 5.0.04 -> 6.5
Has anybody out there noticed problems with the dynamic creation of
multi-table datawindows and referring to the datawindow columns? In 5.0.04
PowerBuilder automatically prefixed each datawindow column with the table
name(e.g. table_name_column_name). This is now broken in PB 6.5.
Why did this change in 6.5? What necessitated this change so that all
Sybase customers are forced to perform costly regression testing on
PB Enterprise 6.5
ODBC - any dbms( Sql Any, MS SQL, Oracle, Sybase ASE, Quadbase )
...datawindow.column.count not returning the column count of a datawindow
I am having problems with the datawindow.column.count property of a
datawindow. It just started happening with PB 6.501 and still works
fine in PB 5.0. The function that looks at this property is in an
ancestor userobject. The dataobject is assigned at this point but all
other properties of the datawindow are missing. Any suggestions?
Don't recall, but was it still dwDescribe() in version 5.0? If it was that
may be your problem.
Kent Montgomery wrote:
> I am having problems with the datawindow.column.count property of a
> datawindow. It just started happenin...Column names in an N-UP datawindow
I have an N-Up datawindow that has 6 columns with only 2 being displayed.
When I loop through my dataobject to get the names of the columns, 6 are
returned, but the names of the 2 on the datawindow have a '_2' after the
name. I was actually expecting to have 8 columns returned with two having
'_1' and two having '_2' at the end of the names. I am running PB 7.0.2
Build 8046. Here's a sample of the code:
ii_dw_numofcolumns = Integer(ids_parse.Object.DataWindow.Column.Count)
*Should this be returning 8, maybe?
For li_columncounter = 1 to ii_dw_numofcolu...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.
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...What are valid datawindow column names?
For an application where the column names of a dynamically created
datawindow are depending on names that users specify via our user
interface, we need to know which names are valid column names in order to
validate the user input. The main reason for this is that users want to
have these as column headers in exported files (Excel, txt, csv...),
created via datawindow.saveas(). Some users will use Asian characters for
We could not find any documentation on this. The documentation on valid
identifier names seems to refer to PowerScript, not to ...Datawindow Column Name Generation
With every(may be most) release, PB has been changing the way it names
columns when the SQL is changed for a datawindow. Some of my datawindows,
since 4.0, I have to export, change SQL and import to avoid my computes
being commented out and all my layout screwed up because it deletes invalid
I have even added columns using this technique. Sometimes it becomes very
difficult and have to rebuild the whole layout. It would be nice if a
standard method is adopted.
...Column named changed in datawindow!
I am trying to update a existing datawindow with some new columns. Once I
have selected the columns the names of ALL columns disappear and are
replaced with "compute_0001, compute_0002, compute_0003," etc. In the column
specifications box I see the compute name is in both the name and the DB
This also happens if I try to create a new datawindow. However, the text
labels have the correct name.
This obviously won't do. In my testing I have discovered it only happens if
there is an @ sign in the column name. Now we have been using @ signs in
column names (an...How does a datawindow column get its name?
Q: How does a column get its name?
Datawindow is built using
Tabular - SQL Select - and Converted to Syntax.
On existing datawindow - the column names have been modified to strip off
the table names (so table name "company" was stripped from column name
"company_code" to make it as just "code").
I was changing this existing datawindow - adding one another column.
After adding the column into the SQL-SELECT, the datawindow display warning
"SELECT change has forced update specification change" ( I have update
pro...how to get all the column names from datawindow
I would like to get all the column names from datawindow.
any help apppreciated
//1. Column names
Int li_col_count, ls_columns
FOR i = 1 TO li_col_count
ls_columns[i] = idw.Describe("#" + String(i) + ".Name")
//2. If you need to include CF's look at the
Object.DataWindow.Objects string (tab separated) and parse
it back to an array of DW objects.
> I would like to get all the column names from datawindow.
> any help apppreciated