|
|
can u please send me the actual code for that method?
Pramod
|
|
|
|
|
I've created a C# application with an Access DB on the back end. The problem I'm having is it seems like the code is executing faster than the DB can accept changes. I've got an "Add New" form that the user enters data in to add a new dealer. When the user hits the Save button, I insert the new row and close the "Add New Dealer" form. I then reload my Dealer combo box on the main form from the Dealer table. However, the code seems to be reloading the the combo before the new row makes it into the table. My first thought is to Save the row, then pause the code execution for a second or two to allow the table to catch up. Then continue the code execution and reload my combo. If there's a better solution to the problem (other than getting rid of the Access DB), I'm all ears. But at the very least, I'm looking for help on how to pause the execution of the code in for a specifict interval ("Pause(2)" function below) between the "Insert row" function and the "Reload combo" function. The pseudocode is below. Thanks in advance for any help.
//On main form
private void AddNew()
{
frmAddNew.ShowDialog();//show AddNew dialog
Pause(2);//Pause code for 2 seconds
ReloadCombo();//reload Dealer combo including newly added dealer
}
//On AddNew dialog box
private void Save()
{
CollectData();//Collect user entered data from Dialog
InsertRow();//insert new row into Dealer table
this.close;//close add new form and return control to main form
}
Jake
|
|
|
|
|
Are you using separate connections for update and reading? Are you keeping the connection open during the execution of the program?
If you keep a connection open for reading and do the update using another connection, there can be quite some time before the change is visible. If you use the same connection or close the connections when they are not used, the change should show up immediately.
---
b { font-weight: normal; }
|
|
|
|
|
That was the problem. I was using two separate connections and not closing them when I was done. I added the close statement and everything is working great now. I thought the Access DB was just so slow it couldn't keep up with the code execution. I've never used an Access DB before, I'm used to SQL Server so I wasn't sure how capable it was. I will slap my wrist for this one, I should know to do better object cleanup. Thanks for the help.
Jake
|
|
|
|
|
Is your database updated when Save method executes?
If you could send the code which actually deals with data, we could help you much easier...
|
|
|
|
|
Make sure you are refreshing the local dataset and not just sending updates to the database. Clear and refill the dataset before ReloadCombo() if you arent already, and you have made sure the local dataset is up to date. I seriously doubt your program is going faster than your database. The program should not continue execution from InsertRow() until the data has been completely updated in the database.
Aaron
|
|
|
|
|
Thanks for the info. I thought it would be odd that the code would execute faster than the DB also, but when I would step through in debug everything work fine. It was just when I executed without breaking that the problem occurred. I am refreshing the local dataset each time. In the ReloadCombo() function the first thing I do is clear the table in the dataset then do a select from the table again. I took the advice from the ealier post and closed my connection after the insert row step and that seemed to fix the issue.
Thanks,
Jake
|
|
|
|
|
Hi folks,
I am trying to use C# to get the IIS application pool identity.
I know it's possible to use Vbscript but it seems like there are no equivalent functions, properties in C#.
Do you guys know how?
Thanks,
Johny
|
|
|
|
|
|
Could you show me how to display 'a group per a page'
I have some groups and I want to display group1 on page1, group2 on page2.... Could it be possible?
Thanks so much.
|
|
|
|
|
You have different sections for each group. If you dont have more data than can fit on a page, then it is possible. Otherwise the group may go to another page. You can make the next group display on a new page by selecting the "new page after" property in the section properties.
Aaron
|
|
|
|
|
Hi guys, I need to create a listbox control. The control needs to have a button with it, up and down, which will control the navigation of the items on the control. One more thing, I need to permanently hide the vertical scrollbar.
|
|
|
|
|
What are you trying to do? The scrollbar on the listbox acts like a navigation up and down. Why do you need to hide it and do something different?
You would have to inherit the class to do what you want to do.
Aaron
|
|
|
|
|
Hi aaron...
I actually need to create a user control with that feature... a class that will inherit a listbox and within the listbox i need to add 2 button controls which will serve as a navigational tool for the items...
i have already found out how to hide the scroll bar through ShowScrollBar api call...
what i need right now is how to be able to control the items through the buttons and to be able to place the buttons at the same place (top and bottom of list box) regardless of how many items are placed in the listbox.
thanks!
|
|
|
|
|
I have a user control that inherited from Panel. I want to remove the dotted boder that the panel paints. The base.OnPaint is not called so how exaclty do I remove the Panel border?
Thanks
|
|
|
|
|
The panels I use doesn't draw a dotted border. Are you sure that it's not just the designer that draws the border?
---
b { font-weight: normal; }
|
|
|
|
|
Does it show border while in the IDE or when running the application? If it is while in the IDE then dont worry about that the IDE draws that. If you are running the application then I would like to know the Panel you are inheriting from is it part of the Windows.Forms library or you own? As far as I know Panels do not ever have a dotted border unless you put it there.
Mitchell Geere
|
|
|
|
|
The border only shows up in design-time. I created a control that inhertied from the panel though I do not want the dotted border in design time.
|
|
|
|
|
Nm my dumbness just need to add a desingner and override onpaintadorments
|
|
|
|
|
I’m a software engineering student. And I’m now at the ending of the course period. In this situation I should present my thesis but I have some problems in choosing subject of my thesis. I like to work on my field and have an article on my field. I also like to have a practical, new, scientific and difficult problem to some extend. I love researching and during my course period, I have researches and projects on bellow subjects:
1- Objective Oriented.
2- RUP.
3- All different software architecture.
4- Web base architecture.
5- Web services.
6- RSS.
7- Software locking algorithm.
8- Multi threads application.
9- Encryption algorithms.
10- Compression algorithms.
11- Database designing.
12- DBMS architecture and comparison between all kinds of it.
13- Service oriented programming.
14- Ajax and new web based architecture.
15- Researching about server side web development tools Like Microsoft .Net and PHP and j2ee and so on.
16- Socket programming.
17- DNS querying.
18- FTP Management.
19- Computer Graphics.
20- Image storing formats.
21- …
I like to have a thesis subjects about above items or depending on them or relating them or something on their fields. But I also love new subject in software engineering or programming and if you have some these subject, make me really happy and thankful.
Please offer me some subjects or some sites which offer me some subjects with above specifications.
Thanks
Rastgar
|
|
|
|
|
You can get all the information on the above subject from www.google.com but, on a serious note why not cover a topic which in my opinion is far less done and that is on software project management, testing and getting the product to market within a given time and at a specific qaulity. This is something the software market has huge issues with and could use some brilliant thoughts on the topics to push for better qaulity in shorter periods. Just a thought
Mitchell Geere
-- modified at 19:36 Sunday 2nd April, 2006
|
|
|
|
|
i have an assigment to program an app to find the value of p and q where p and q is tow numbers that give me the value of N > N=P*q ,if i know the n the i will know the value of p and q , by genetic algorithms the number should be presented in binare 1 and 0 .
101011110101...1010111011
------------- -----------
P Q
if their is any body could help me pleas contact me in my email addrres osanaji@yahoo.com
thank you all
|
|
|
|
|
What is it that you need help with?
If you ask the question in the forum, expect the answers in the forum, not in your email.
---
b { font-weight: normal; }
|
|
|
|
|
i am so soory , i didnot mean that but i need your help with my problem i want to ask you if you hear about cellular automata CA and program it with GA programing ????
if you have any idea please help me :::::::
iwill expect the answers in the fourm >>
|
|
|
|