|
I am have an MDI application where I have several child forms that open under the parent MDI form.
When the child form is opened in the MDI parent form it flickers.
The child form has many controls on it which gets filled by querying from the database when the form loads.
Also the child form has a grid displaying all the records from database.
I am using dataset to fetch more than 2000 records from database and bind it to grid.
I am having problem during loading of this form.
I have tried using following to avoid form flickering:
> DoubleBuffering technique
> Using Datareader instead of Dataset for fetching records
> Fetching records from database after form is loaded using Form_Shown() event
and used BackgroundWorker to Asynchronously fetch records from database.
Can anyone please help me out to avoid the form flickering issue.
Thanks in advance !!!!!!!!
|
|
|
|
|
Hi all...
I'm using C#
I've some images and I want to save these images as pdf file.
can anyone help me in this problem?
Thanks...
|
|
|
|
|
There is a library called PdfSharp in sourceforge. Use it to print image to PDF.
Or you can use some free PDF printer like PdfForge.
|
|
|
|
|
Hi stancrm!
thank you for reply to me.
I'll try using it.
is there an article that show how to use PdfSharp?
thank you...
|
|
|
|
|
or you can use PDF rasterizer too... also this one is open source i believe
|
|
|
|
|
thanks stancrm
your reply was great and helpful...(^^)
|
|
|
|
|
I've created a web browser class in my project(C#) and pass a url with few parametes to it.. this whole data gets visible on clicking on View Source on context menu.
How can i disable it?
|
|
|
|
|
|
Ok,
but can I do something to hide those data?
|
|
|
|
|
I dont think so. You cannot hide the HTML code. It stored in your local IE cache. You can also open it using Notepad. Or you can use SaveAs, it will also be saved as HTML file.
|
|
|
|
|
Dear All,
I am working on window application in C# i need to retrieve on record by using sql query but as record can't accessible with single query so i am using nested query to access the record query is correct i tested it in sql query analyzer but error in c# syntax query is this.....
rec = "select student_id from student_biodata where student_name = " + lstStudentName.Text + "";
string str = "select * from student_biodata where student_id = " + rec + "";
when i run this block error is Incorrect syntax near the keyword 'select'
this is in second query when i combining second query.
Please tell me what is the correct syntax of nested query in C#.
Thanx
Sajjad Ali
|
|
|
|
|
Your nested query does not make sense.
string str = "Select student_id from student_biodata where student_name = '" + lstStudentName.Text + "'";
Isn't this what you are trying to do ?
You missed quotes for student name in your orignal query.
|
|
|
|
|
1) rec = "select student_id from student_biodata where student_name = " + lstStudentName.Text + "";
2)string str = "select * from student_biodata where student_id = " + rec + "";
i want to get student_id first then i want to use id for specific record to display in data grid.
|
|
|
|
|
I assume this is homework and the fact that your code is not secure is not a problem ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
Read up on SQL injection attacks.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Try out this:
rec = "select student_id from student_biodata where student_name = '" + lstStudentName.Text + "'";
string str = "select * from student_biodata where student_id = " + rec + "";
OR
rec = "select student_id from student_biodata where student_name = '" + lstStudentName.Text + "'";
string str = "select * from student_biodata where student_id IN " + rec + "";
Reply me whether anypone of this worked or not
|
|
|
|
|
rec = "select student_id from student_biodata where student_name = " + lstStudentName.Text + "";
string str = "select * from student_biodata where student_id IN " + rec + "";
After this code their is an other error and where data adapter filling dataset
like this is the code
da.Fill(ds)
exception is on this line then it shows error message
Incorrect syntax near the keyword 'select'
Now what to do more ?
|
|
|
|
|
might be the problem is
rec = "select student_id from student_biodata where student_name = " + lstStudentName.Text + "";
string str = "select * from student_biodata where student_id IN =" + rec + "";
don't use IN as well as = together
and put quotes for student name field
Write it like this:
rec = "select student_id from student_biodata where student_name = '" + lstStudentName.Text + "'";
string str = "select * from student_biodata where student_id IN " + rec + "";
Reply me whether it works or not
modified on Wednesday, March 4, 2009 2:39 AM
|
|
|
|
|
Dear,
rec = "select student_id from student_biodata where student_name = " + lstStudentName.Text + "";
string str = "select * from student_biodata where student_id IN " + rec + "";
After this code their is an other error and where data adapter filling dataset
like this is the code
da.Fill(ds)
exception is on this line then it shows error message
Incorrect syntax near the keyword 'select'
Now what to do more ?
|
|
|
|
|
simply try adding single quotes for student name field
rec = "select student_id from student_biodata where student_name = '" + lstStudentName.Text + "'";
string str = "select * from student_biodata where student_id = " + rec + "";
OR
string str = "select * from student_biodata where student_id IN ( select student_id from student_biodata where student_name = '" + lstStudentName.Text + "')";
|
|
|
|
|
Dear,
Still i am not accessing acquired record with your this replay i am thankful i am getting records of two students one is in Class A and second is in Class B with same name like name is ABC in both classes, now i need only one record of selecting name in list box box with student id which is primary not with same name.
Thanks
Sajjad Ali
|
|
|
|
|
|
Catch the click and open a menu.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yea. true.. But nowadays in from .Net 2.0 onwards i think we are having much more luxury.. that is to use a dropdown button control itself .. in this kind of situations.
I belive dropdown button is a part of Menustrip
|
|
|
|