Showing posts with label textbox. Show all posts
Showing posts with label textbox. Show all posts

Monday, March 19, 2012

error in searching records

Hi

I am developing windows application.

I want to find records which has a particular number which is entered in textbox.
and result is displayed in datagrid.

If the entered number didnt find in database it must be displayed msg.

i tried it like as below but not working.

qlConnection conn = new SqlConnection();
conn.ConnectionString = "Server=EBSERVER;UID=sa;Database=Airport-Clearance;";
//SqlConnection sqlconn = objcs.GetConnection();
//MessageBox.Show("Connected");
//sqlconn.Open();
//Do what ever

SqlDataAdapter filling = new SqlDataAdapter("select * from Airport where awb='" + txtawb.Text ,conn);

DataSet displaying = new DataSet();

conn.Open();
filling.Fill(displaying);
dataGrid1.DataSource = displaying.DefaultViewManager;
conn.Close();

Waiting for reply.

Warmest regards,
ASIF

can you explain what "not working" is? Does it throw any errors? or does it not return anything?

What is the datatype of your "awb" column in the airport table?

Wednesday, March 7, 2012

Error in Hiding Report Item

Hi,
I am trying to show the textbox depending on the page numbers in Page
Footer. But, I get the following error in doing so
Expression in Visibility section of Textbox:
IIF(Globals!PageNumber>1,true,false)
Error: The hidden expression for the textbox 'textbox400' has the value
"IIF(Globals!PageNumber>1,true,false)", which is not a valid Boolean value.
Can someone help me with this
Thanks
Ponnurangamexpressions should begin with "="
i.e.
=IIF(Globals!PageNumber>1,true,false)
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ponnurangam" <ponnurangam@.trellisys.net> wrote in message
news:OGwmayVmEHA.412@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I am trying to show the textbox depending on the page numbers in Page
> Footer. But, I get the following error in doing so
> Expression in Visibility section of Textbox:
> IIF(Globals!PageNumber>1,true,false)
> Error: The hidden expression for the textbox 'textbox400' has the value
> "IIF(Globals!PageNumber>1,true,false)", which is not a valid Boolean
> value.
> Can someone help me with this
> Thanks
> Ponnurangam
>|||Try enclosing the TRUE and FALSE statements in double quotes (").
"Ponnurangam" <ponnurangam@.trellisys.net> wrote in message news:<OGwmayVmEHA.412@.TK2MSFTNGP10.phx.gbl>...
> Hi,
> I am trying to show the textbox depending on the page numbers in Page
> Footer. But, I get the following error in doing so
> Expression in Visibility section of Textbox:
> IIF(Globals!PageNumber>1,true,false)
> Error: The hidden expression for the textbox 'textbox400' has the value
> "IIF(Globals!PageNumber>1,true,false)", which is not a valid Boolean value.
> Can someone help me with this
> Thanks
> Ponnurangam|||Sorry, i read this error wrong. Do you have an equals (=) sign in
front of the expression? i tried what you did, and it works fine for
me.
=iif(Globals!PageNumber>1,TRUE,FALSE)
"Ponnurangam" <ponnurangam@.trellisys.net> wrote in message news:<OGwmayVmEHA.412@.TK2MSFTNGP10.phx.gbl>...
> Hi,
> I am trying to show the textbox depending on the page numbers in Page
> Footer. But, I get the following error in doing so
> Expression in Visibility section of Textbox:
> IIF(Globals!PageNumber>1,true,false)
> Error: The hidden expression for the textbox 'textbox400' has the value
> "IIF(Globals!PageNumber>1,true,false)", which is not a valid Boolean value.
> Can someone help me with this
> Thanks
> Ponnurangam