Search results for query: *

  1. roccoman

    Question Filter DataSet with parent / child tables

    jmcilhinney - i am not displaying the data at all. the data is to be used in a report output (mailing labels to be specific). my intent is to filter the parent datatable records by a value (where fieldA = "X") and then have only those corresponding child records be present in the child...
  2. roccoman

    Question Filter DataSet with parent / child tables

    hi all, been awhile since i posted here i'm not %100 sure this is the proper forums (my question is about DataSets within the code) but here goes: i have a DataSet with 3 tables - 1 parent table ("TableA"), 2 child tables ("TableB", "TableC"). i need to cascade the results when i filter the...
  3. roccoman

    Listbox question

    then you just remove the thunderbird entry from here: Dim obj() As String = {"Thunderbird", "FireFox"} change to: Dim obj() As String = {"FireFox"} whatever is in the {} is just a list of items - if you wanted to list the letters A thru E you would say: Dim obj() As String = {"A", "B"...
  4. roccoman

    How to write comments?

    i have found that putting my initials and a date in comments when changing code is helpful - if another dev needs to look at it and also the date lets you know how recent the change was made
  5. roccoman

    Directories managment,.

    if you know the path of the directory in variable string_current_folder you could just do a lastindexof search for the folder seperator (usually "\") '' filling in dummy data string_current_folder="C\Folder1\Folder2\Folder3" dim sNextFolderUp as string = string_current_folder.substring(0...
  6. roccoman

    Showing a SQL result

    you cant access a variable outside of the scope you declare it in - since you declare ReturnValue inside the Button1_Click event you cant access it outside of that event. you would need to move the declarations to a higher level Dim ReturnValue As Object = Nothing i assume this is on...
  7. roccoman

    Showing a SQL result

    replace: myCommand.ExecuteScalar() with ReturnValue = myCommand.ExecuteScalar() so long as your SQL command is returning a value from the database you should be good to go
  8. roccoman

    Showing a SQL result

    look at your "ExecuteScalar()" and tell me if anything looks funny... i'll give you a hint: i dont see where the variable "ReturnValue" is receiving a value. c'mon thats easy to diagnose!
  9. roccoman

    Showing a SQL result

    can you get the last date value from the database using "select payrolldate from payroll where payrolldate <= getdate ()" ? if so you can move it into datetime variable and use the AddDays(1) to add 1 day to it. If ReturnValue IsNot Nothing Then dteReturnValue =...
  10. roccoman

    change size of comboboxin DataGridViewComboBoxCell?

    just off the top of my head you may want to change the font size of the Combobox column - this is how you would make a regular comobox "taller"
  11. roccoman

    Showing a SQL result

    you're never setting the variable "dteReturnValue" value. change If ReturnValue IsNot Nothing Then Convert.ToDateTime(ReturnValue) End If to If ReturnValue IsNot Nothing Then dteReturnValue=Convert.ToDateTime(ReturnValue)...
  12. roccoman

    Showing a SQL result

    change line: ButtonDialogResult = MessageBox.Show("The next date available to you is" {0}",dteReturnValue.ToShortDateString()), "Payroll", MessageBoxButtons.YesNo) to: ButtonDialogResult = MessageBox.Show(string.format("The next date available to you is...
  13. roccoman

    Question Creating a custom button and adding it to the toolbox...

    one thing i did read while researching this is you would have to remove the reference from a project and then re-add it in again after you rebuild the DLL - or crete a new project & add the reference to the newly compiled DLL. it could be as simple as that. <<15 minutes later>> i just created...
  14. roccoman

    Showing a SQL result

    Dim connectionString As String Dim cnn As SqlConnection Dim myCommand As SqlCommand Dim ReturnValue As Object = nothing Dim dteReturnValue As DateTime = nothing this way you can access those variable anywhere inside the button_click event. also you never put the date retrieved from the...
  15. roccoman

    Question Creating a custom button and adding it to the toolbox...

    i dont know if it will work for a class - from what little i have seen on the subject its always shown as a compiled DLL
  16. roccoman

    Retrieve Multiple Values from Listbox

    Label1.Text = Label1.Text & " - " & strselecteditems
  17. roccoman

    Showing a SQL result

    ok good. your msgbox is inside the CATCH block - since no exception is being thrown (returning NOTHING from a ExecuteScalar() is a legit return) then your msgbox code will never display. i am curious - have you tried stepping thru the code? you keep refering to output windows and whatnot, and...
  18. roccoman

    Showing a SQL result

    can you mouse over the "ReturnValue" variable after the line "Dim ReturnValue As Object = myCommand.ExecuteScalar" executes to see exactly what value (if any) exists there? or add a watch on that variable and see its value
  19. roccoman

    Showing a SQL result

    one thing: you should move your cnn.Close() outside of the TRY part of the TRY/CATCH. if an error is thrown before it reaches that code then your connection is never closed. i'd suggest moving it to after the TRY/CATCH block. so are you saying that after Dim ReturnValue As Object =...
  20. roccoman

    Question Creating a custom button and adding it to the toolbox...

    then what you may want to do is create a DLL containing any custom controls you guys will need. create a new project but instead of a windows app create a "Windows Control Library" add your "MyButton" class to it and remove the default UserControl file from it (since you wont be using it)...
Back
Top