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 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 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 name
How i can to get the column's name with it index.
I tried this in a datawindow with 10 columns:
for i=1 to dw.rowCount()
name = dw.describe("#" + i + ".name")
but when i going to try it only show me the name of the first column (1)
dont work with 2,3... etc.
you know any other method ?? What i can do ??
You are looping on a rowcount() - it does NOT have anything to do with
Yup. You need to use Integer (Describe ("...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...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
"The action just taken has forced the preview view to be rebuilt. You may
need to re-retrieve your data."
And what I see is some of the existing columns have disappeared. Because
they are renamed now, they move at the end - so here the "code" has been
renamed as "company_code". But that name too is not consistent. If I have
multiple tables in FROM clause, and I change the table order, I am not sure
which table name will be used as a prefix to the column name.
So my question is:
How does a datawindow column get its name?
[PB 9.0 Build 6086]
If there is only 1 table in the FROM clause, the datawindow columns will be
just the database column without the table name prepended. With multiple
tables, however, the table name is prepended to the column name with an
underline as a separator to prevent abig...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 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_numofcolumns
is_dwcolumns[li_columncounter] = ids_parse.Describe("#" +
String(li_columncounter) + ".Name")
TIA for any help,
Phoenix Systems, Inc.
(404) 633-6465 ext.240
...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
> TIA...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.ExecuteReader();//begin transfering data to destinationbulkCopy.DestinationTableName = destTableName;bulkCopy.BatchSize = 100;bulkCopy.WriteToServer(readerSrc);
but I get this error when it runs. Data is going to be copied from SQL 7.0 server and inserted into SQL2000 database.
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 have checked the columns and types on both server are exactly the same accept the constrians on the source (sql7.0) does not exist on the destination (sql2000). this souldn't be problem. however, if I peform this operation with the same version of SQL server (from sql2000 to sql2000), it works! :-(
can anyone help me out here? please
Thanks in advance.[#Hardcoder#]
Martix Codes:I have checked the columns and...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 ...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...Datawindow table and column names delimiter
I am developing an application on ASE 11.9 with PB 7.0.3, but sometimes I
take my application to my home computer and work with it there. I have ASA
that came with my copy of PB 7 and to make my datawindow's SQL look like ASE
11.9, I'd like to get rid of the quotes PB puts in the datawindow SQL
enclosing table and column names. I believe this is done through a parameter
in the DBParm option of the profile. If it is, which parameter is that and
how do I define it so I will not have the quotes in tables and column names
on my datawindow SQL?
...Datawindow retrieving column with wrong name
In support of an app, I noticed that a field in a datawindow was not
updatable at runtime. I went to the Update properties of the datawindow,
and sure enough, this column was not selected as an updatable column for the
dw. I selected the column, adding it to the list. When attempting to close
the Updatable columns window, I received an error message similar to the
following: "Cannot update column object, field
"cor_results_insignificant_di" not in table "table_name". However, the
actual name of the field is "cor_results_insignificant_disease...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).
I'm not sure you can. What are you trying to accomplish? There might
be another way of doing it.
Download an evaluation version of DataWindow .NET 1.5 Today!:
DataWindow.NET code examples available on CodeXchange:
PowerBuilder 10.5 Beta available August 15th:
On 18 Aug 2005 07:46:21 -0700, "David" <firstname.lastname@example.org> wrote:
>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).
I am using the N-Up report (3 newspaper columns), each N-Up column has
checkbox (outFlag), PersonName, Phone. I need to hide the phone number if a
checkbox is checked (out-of-office flag).
Now the problem appears that if you have a database column name "OutFlag",
it will not be identifable for what N-Up column it is in (DWDesigner assigns
outflag_1, outflag_2, outflag_3 to identify each field for the N-Up columns
I guess for internal use), but expressions can only refer t...max no of chars of each column in powerbuilder datawindow
I'm using powerbuilder 5.0
what's the max no of char(s) of each column in powerbuilder datawindow ...
i found i can only input 200 char in a column as no limit set in the column
Pls advise ...
There is no restrictive limit the DW puts on column lengths, but your
database may limit you. If you can't enter more data into your column then
either make your column bigger or turn on vertical or horizontal scrolling.
"JJ" <email@example.com> wrote in message
news:HbllVTg3CHA.firstname.lastname@example.org...Error Invalid column name (In Sqlserver 2005) While giving Alias column name
ALTER procedure [dbo].[MyPro](@StartRowIndex int,@MaximumRows int)
Declare @Sel Nvarchar(2000)set @Sel=N'Select *,Row_number() over(order by myId) as ROWNUM from MyFirstTable Where ROWNUM
Between ' + convert(nvarchar(15),@StartRowIndex) + ' and ('+ convert(nvarchar(15),@StartRowIndex) + '+' + convert(nvarchar(15),@MaximumRows) + ')-1'
Exec Sp_executesql @Sel
--Execute Mypro 1,4 --->>Here I Executed
Select *,Row_number() over(order by myId) as ROWNUM from My...Dynamically changing DataWindow column names
I need a way to "Dynamically change DataWindow column
This so that when a user wants to save a datawindow as an
excel file, that a more user-friendly column name can be
used instead of the cryptic database column name.
Please advise. Thank you.
Dynamically create an external dw with all the columns you want and column
names you want. Then move the data from original dw to know dw, and then
call saveas(). It does not need any formatting. Create a external dw, export
to syntax, look at how its structured. Then you can dynamically build one
very easily by loop...column name changing on external datawindow
I've created an external datawindow with approximately 20
columns. After adding several new ones thru the view column
specs, the names of one or two columns changes.
I've deleted the datawindow and rebuilt it and it still
happens. The names are correct and match the dbname. I've
also regenned and optimized the pbl. It's almost as if
there's a bug in 702 build 8003.
This is very annoying, any ideas?
export the dw (or use View Source in PB9), use a program like notepad and
check the names there.. correct and import again.
<miguel> wrote in message ne...Crosstab datawindow column header names ???
I am trying to read column header values of a crosstab datawindow :
- I tried GetItemString ( ), but what are the names of the text header fields : I only got the column name
defined at design time.
- A Describe ( "DataWindow.Crosstab.Columns" ) also give me names at design time.
Thank you for your ideas...
> I am trying to read column header values of a crosstab datawindow :
> - I tried GetItemString ( ), but what are the names of the text header fields : I only got the column name
> defined at design time.
> - A Describe ( "DataWindow....CrossTab Datawindows and Getting the Column Names
I'm kind of new to the Crosstab Datawindow. Currently,
we are trying to develop a Crosstab Datawindow to show a grid similar to:
Extra Small Small Medium Large Extra Large
with empty boes to type in. This would be used when someone is taking an
order for shirts, for example. I can pretty much get this far. My problem
is when I am trying to get the name for the Columns. I am using the...dot notation for datawindow column name
I use ls_colname =GetColumnname() to get the column in a datawindow event.
What is the dot notation script instead of the above function?
<DW Control Name>.Object.<Columnname>.Name
use your dwsyn man.
"SkyRaider" <email@example.com> wrote in message
> Dear all,
> I use ls_colname =GetColumnname() to get the column in a datawindow event.
> What is the dot notation script instead of the above function?
> Thank you.
There isn't a...