Using @column = [column] SQL Server 2000
Should the following select statement return ALL the records including the records where [district] is null? Currently it is only returning non null records. I tried it with a default value and without with the same results.
SelectCommand="SELECT [ID], [last], [first], [district], [TA] FROM [regd] Where ([district] Like case when @district is null then [district] else @district end)"
<SelectParameters ><asp:ControlParameter ControlID="Last_textbox" Name="district" defaultvalue="%" PropertyName="Text" Type="Str...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
Any help is appreciated!!
> This ones burning me because, I am sure i've done it before and It's simply
> slipping my mind.
...Searching all columns without using column name
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:
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...Error with dddw using computed column as data column
I'm working with PB 5.0.04 on Win 95.
I have a datawindow object which I want to use as dddw. This datawindow object
retrieves a numeric ID and three string fields from a table. I created a
(named) computed field in the detail band which consists of a concattenation of
the three string fields. I'm not allowed to use a SQL computed column.
When I use this datawindow object as dddw with the computed column as
display-item and the ID as data-item I can't store the (main) datawindow. I get
a "syntax error at line ## in column ##" ...??
Can this be c...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
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 ?
Well that's not a PB-generated error, so it must be in your code somewhere...Using the column value of another row in computed column.
Hi fellow PBer's,
I am having trouble figuring out how to reference the column value of a specific
row. In the computed columns property sheet, I select the "More" button to
modify the columns expression. The way I understand help is to specify
columnname[integer] where integer is the number of rows (positive or negative)
relative to the current row (ie Total[-1] would be the value of the Total column
in the previous row. However, I cant seem to get this to compile in the modify
expression painter. I am using PB5.0 on Win95. Any help would be greatly
...how to fetch column using column index in sql server.
I have several columns in my table, but I want to fetch data using column index instead of column name in select command.
is there any way to do this.Please remember to click “Mark as Answer” on the post that helps youJasim AkhtarNew Delhi ( INDIA )
Yes there is.It's called dynamic SQL and it's a complicated process.See http://www.sommarskog.se/dynamic_sql.html Please click "Mark as Answer" if my reply solved your problem.CheersRammohan...Reference gridview column index using column headers
Greetings,I have several GridViews all showing different collections of similar product data. Due to changes in codes used to distinguish properties such as color and size, I'm having to write several rules into the row databound events. The issue I'm having is that the group who will be using the application haven't finalized the order of the columns, so everytime I reorder the columns, I have to changes all the column indexes in my code behind so that the rules are being applied to the right columns. I'd like to know if there is a way to reference the colu...how to move from column to column using rightarrow, leftarrow or enter?
I have the codein datawindow custom event to capture if the user is pressing
rightarrow, leftarrow or enter. I want to be able to move from column to
column either right or left. How can I do that in the datawindow? Is there
an offset function? I havent seen one.
CHOOSE CASE key
file://move to the left cell
file://move to the right cell
file://move to the left cell, same as tab
It is obviously possible to do this (just search...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...Hiding columns in the ItemDataBound event without using the column index
Lately I've needed to hide certain columns in DataGrids depending on the specific data source so I create a property at the top of the page like so:
private string DisplayProjDesc
//DisplayProjDesc property - for ItemDataBound event of the DataGrids to determine whether to display project description
this.lblBoolDispProjDesc.Text = value;
}Then, in the ItemDataBound event of the DatGrid, I use something like:
this.dgProject....Hide a Gridview column but use the value in that column when the row is selected.
I need to retrieve a column from my database but do not want to display it in the gridview. However, I need to be able to show that information later in the application. I am using the wizard control. I believe I can use the DataKeyValues property of the gridview but can't figure out how to write the code to get the value of the cell in that column when the row is selected so it can be referenced later. I am using VB. Thanks for your help!!
Found the answer. Here it is in case anyone else needs it:
&nbs...Cannot delete columns of GridView by using "Edit Columns..."
I have a GridView with quite a few auto-generated fields. When I go to GridView Tasks to use "Edit Columns..." to delete a few columns, the design window shows the columns removed just as expected. However, the source code does not change at all. If I save the .aspx file and reopen it, it shows all the deleted columns like nothing has changed. I can go to the source code to delete the fields and the deletion will stay. I am using VS 2008 standard edition.
Could anyone shed some light on this?
Hi,In the gridview have some Bound fields from edit co...Have problem setting column back to first column using pbm_dwnprocessenter
Used pbm_dwnprocessenter to emulate 'Enter' key as 'Tab' in PB, but is
having trouble in setting the focus back to first column when datawindow hit
the last column. Please help.
IF GetColumnName() = 'the_last_column' THEN
"matchoy" <email@example.com> wrote in message
> Used pbm_dwnprocessenter to emulate 'Enter' key as 'Tab' in PB, but is
> having trouble in setting the focus bac...