Showing posts with label displayed. Show all posts
Showing posts with label displayed. 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?

Friday, February 17, 2012

Error Icons displayed on parent objects with no or different children

I recently had to restore a database from backup and the restored
database had a different set of publications than the one I overwrote.
Since then, in EM, on the Replication Monitor object, Publishers, and
Servername objects as well as on the Agents and Snapshot Agents
objects, I see the little red X denoting an error. I have done
everything i can think of and more, following much advice given on this
group. I even turned replication off, deleted all publications, used
hilary cotter's script to clean up all the miscellaneous replication
tables/settings, etc. and restarted the server.
Everything seems to be working fine, but I would like to try to clean
up these "errors". Does anyone have any suggestions?
I am running SqlServer 8.00.2039 SP4 Standard Edition on Windows Server
2003 SP1
You will have to manually remove the replication jobs in msdb. Sometimes you
will get transitory error messages in EM, run sp_MSload_replication_status
to clear them.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"troy" <troyblakely@.gmail.com> wrote in message
news:1125073355.972990.114690@.g47g2000cwa.googlegr oups.com...
> I recently had to restore a database from backup and the restored
> database had a different set of publications than the one I overwrote.
> Since then, in EM, on the Replication Monitor object, Publishers, and
> Servername objects as well as on the Agents and Snapshot Agents
> objects, I see the little red X denoting an error. I have done
> everything i can think of and more, following much advice given on this
> group. I even turned replication off, deleted all publications, used
> hilary cotter's script to clean up all the miscellaneous replication
> tables/settings, etc. and restarted the server.
> Everything seems to be working fine, but I would like to try to clean
> up these "errors". Does anyone have any suggestions?
> I am running SqlServer 8.00.2039 SP4 Standard Edition on Windows Server
> 2003 SP1
>