Search results for query: *

  1. emaduddeen

    Question How do you refresh a datagrid from a different form?

    Hi jmcilhinney, I wish to code it the proper way. Could you show me some code samples on how to do it? When the app starts, the MDI MainForm is displayed. The user opens the FormBooksInLibrary form and then the user opens the FormBooksBorrowed form using buttons on the MainForm. The class...
  2. emaduddeen

    Question How do you refresh a datagrid from a different form?

    Hi Everyone, I have an app that opens up 3 forms. 2 forms have a datagrid the other form has book lending details. The datagrid forms are for books in the library and books that have been borrowed. Both datagrid forms will be open as shown in the attachment, how do I refresh the "Borrowed...
  3. emaduddeen

    Question VS 2010 Crashes when I try to modify DataAdapter select statement when running app

    Hi Josh, Can you look at my code and let me know what additional code I'm missing and what code I need to get rid of? Truly, Emad
  4. emaduddeen

    Question VS 2010 Crashes when I try to modify DataAdapter select statement when running app

    Hi Joshdbr, Instead of reinstalling the software, we are doing it the way jmcilhinney suggested because it will take too long to do a reinstall. Truly, Emad
  5. emaduddeen

    Question VS 2010 Crashes when I try to modify DataAdapter select statement when running app

    Hi, Thanks for the reply. I read the MSDN article on how to do that. I do have another question and I believe I'm missing some code here. We are trying to insert a row into to database but the data is not really inserted in SQL Server. Here's the code from clicking the "New" button...
  6. emaduddeen

    Question VS 2010 Crashes when I try to modify DataAdapter select statement when running app

    Hi Everyone, I wanted to re-configure a DataAdapter and VS 2010 allowed me to change the Select statement in the wizard and all appeared ok until I tried to run the app. The attachment shows the error. After saving the app after many time clicking the Ok button many times I loaded the app...
  7. emaduddeen

    Question Database book sample code not saving changes to the database

    Hi, Thanks for the reply. About the book, it's an old ebook from 2002. Yes, there is a BindingSource it was created at design time when I set the TextBox binding in the Properties tab under the (DataBindings) (Advanced) Text property. That part works fine because it displays data in the...
  8. emaduddeen

    Question Database book sample code not saving changes to the database

    Hi Everyone, I'm using the book titled "Database Programming with Visual Basic® .NET and ADO.NET: Tips, Tutorials, and Code". I'm going through the chapter that has me do data binding by setting the properties of a DataGrid and TextBoxes. It had me drag a DataAdapter onto the form using the...
  9. emaduddeen

    Looking for sample app the uses data binding with a grid control and textboxes

    Hi Everyone, I'm looking to see if anyone has a sample app or has a link to such an app that uses data binding with a grid control and textboxes and is able to insert, change and delete from a datatable which gets updated to a sql server database. I have done an app that has the grid control...
  10. emaduddeen

    How do you create an compound primary key where the 2 column in the key is identity?

    Hi cjard, Thanks for the query to get the correct number. That's was a very tricky one for me. Truly, Emad
  11. emaduddeen

    How do I test an amount entered into a textbox is <= the largest number in a table?

    Hi cjard, Thanks for the help. It's very much appreciated :) Truly, Emad
  12. emaduddeen

    How do I test an amount entered into a textbox is <= the largest number in a table?

    How do I test an amount entered into a textbox is <= the largest number in a table? Hi Everyone, Can you tell me how to fix my query so I can determine if an amount entered into a textbox is < the largest number in a database table? Here is some sample data: CategoryNumber ----------------...
  13. emaduddeen

    How do you create an compound primary key where the 2 column in the key is identity?

    Hi Everyone, I have a table that has a 2 column primary key. I set up the key where the 2nd column is an identity column. When I ran my VB application I discovered the ID (2nd column) did not increment the correct way. I was hoping it would increment like this: Category ID 50001...
  14. emaduddeen

    What is the best hand coded way to display date from the database into textboxes?

    Hi, Thanks for the reply. Since I was using the new sub procedure to pass a parameter to the form, I think I may try using a global for the parameter and not use the new sub procedure and move all the code into the forms load event and see if it gets displayed quicker. Truly, Emad
  15. emaduddeen

    How do you stop a DialogResult OK button from executing using code?

    Hi, Thanks for the useful code and help. I will use the code in the form. Truly, Emad
  16. emaduddeen

    How do you stop a DialogResult OK button from executing using code?

    Hi Everyone, I have a button with DialogResult OK set. I'm using the following code to try and do validation: Private Sub ButtonSaveChanges_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ButtonSaveChanges.Validating If...
  17. emaduddeen

    What is the best hand coded way to display date from the database into textboxes?

    Hi. It was not the loading of the textboxes that was slowing it down. It was the call to InitializeComponent(). Is there any way to make it faster? Dim stpWatchInfo As New System.Diagnostics.Stopwatch MsgBox("Press OK when you are ready to see the time elapsed in seconds")...
  18. emaduddeen

    What is the best hand coded way to display date from the database into textboxes?

    Hi, Thanks for the reply. Yes, the code gets 1 row from the dataset. I did not test it yet. I will look up how to user the stopwatch to see which statement is slow. By hand coding I am not using the wizard to create the dataset, data adapter, etc. because they are created by vb code...
  19. emaduddeen

    What is the best hand coded way to display date from the database into textboxes?

    Hi Everyone, Can you tell me what is the best hand coded way to display data from the database into textboxes? Currently I'm using a data adapter, data set, with a parameter. After I fill the dataset, I load the data into the textboxes using this code as an example...
  20. emaduddeen

    Autonumber column - How do you find out what the most recent inserted number is?

    Hi, Thanks for the help. I changed & to + and it worked. Truly, Emad
Back
Top