Search:

Type: Posts; User: Darkmatter5

Page 1 of 5 1 2 3 4

Search: Search took 0.02 seconds.

  1. [RESOLVED] Difference between "public Form1()" and "private void Form1_Load()"

    Can anyone tell me the impacts of using simply "public Form1()" versus "private void Form1_Load(object sender, EventArgs e)"?

    Currently I'm not seeing a different.

    Thanks!
  2. Replies
    1
    Views
    1,166

    Variables class with ConnectionStrings

    I have 4 connection string, 1 for LocalDB, MySQL, SQL and SQLite. I also have a variables class, I want to be able to pull the connection strings from the applications local settings and use the...
  3. Re: How to access methods in a subclass of a class

    Awesome, it worked great thanks!

    I have another question though.

    I'm getting the following error: Help with System.NullReferenceException error.

    So Here's my code so far.


    class...
  4. How to access methods in a subclass of a class

    I have a class file in my project:

    class DataManager
    {
    public class LocalDB
    {
    public void CreateDatabase() { }
    }
    }
  5. Method that accepts different class objects as parameters

    I need to have a method that accepts different class objects a parameters, but will only handle one object at a time. For example:

    I have two classes "Profile" and "Source"

    I want to have a...
  6. Replies
    1
    Views
    2,738

    How to use BindingSource Events

    I'm wanting to run a custom method when the row a Bindingsource is currently on changes. How can I do that?
  7. Help with iterating through two DataTables and removing rows from one of them.

    I have two DataTables (Assoc and NonAssoc).

    Assoc is a table from a T-SQL query that gets all the companies an individual client is associated with. NonAssoc is a table that loads all the known...
  8. Deleted row information cannot be accessed through the row. Please help

    Here' is my code:



    lb_AssociatesCompanies.DataSource = null;
    lb_NonAssociatedCompanies.DataSource = null;

    DataTable dtAssoc = DataMSSQL.GetRecordByIDAsDT("Companies2IndividualByID",...
  9. Replies
    3
    Views
    6,648

    Help with TableAdapter GetData Method

    I have a TableAdapter that returns rows of data via a query. Here's the code I use the GetData method.



    byrndbDataSet.clientCompaniesDataTable dtAssoc;
    dtAssoc =...
  10. Iterate through BindingSource that was created from a DataTable

    I have a BindingSource who's DataSource was set to a DataTable that I need to iterate through, how do I go about doing that?

    Am I iterating through DataRows of the DataTable? How do I reference...
  11. Re: Get info from listbox datasource

    Worked great thanks!
  12. [RESOLVED] Get info from listbox datasource

    If I have a listbox and it's datasource is an array of objects. How can I get the text value of an element "title" of the selected object in the listbox? Title is one of the elements I created for...
  13. Re: Function giving me "not all code paths return a value"

    so I can just put "return null;" in my catch?
  14. Re: Function giving me "not all code paths return a value"

    Would changing the else in the try/catch to this:

    return null;
    throw new Exception("There was no BindingSource returned");

    not fix the issue? I've added that code and it's still giving me the...
  15. Function giving me "not all code paths return a value"

    Here's my function:



    public static BindingSource GetAllRecords(string table)
    {
    string sSQL = null;
    System.Data.SqlClient.SqlConnection cnGetRecords =...
  16. Replies
    3
    Views
    1,142

    Re: Help with Access (OleDb) and VB.net

    Address 1 and 2 is for physical and mailing addresses of a company profile. I just checked the fields and both address 1 and 2 are able to hold null.
  17. Replies
    3
    Views
    1,142

    Help with Access (OleDb) and VB.net

    I'm trying to insert a record and then get the new ID generated for that new record. Here's my code.



    Public Sub InsertIndividualOnly(ByRef source As DEST_IndClient)
    Dim result As...
  18. Re: get data from listbox controls datasource

    Well I've created a DataTable using:

    Dim titles As DataTable = New DataTable("titles")
    With titles
    .Columns.Add("id")
    .Columns.Add("title")
    End With

    Then I populate the lisbox...
  19. get data from listbox controls datasource

    I need to populate a textbox with the valuemember of the selecteditem in a listbox control. I have populated the listbox via a datatable as the listboxes datasource. How do I go about retrieving...
  20. Re: get the control name from sub routine

    ahh even easier!!

    Thanks!
  21. Re: get the control name from sub routine

    Nevermind


    Dim control As Button = sender

    then call control.Name gets me the name.
  22. [RESOLVED] get the control name from sub routine

    I have a sub routine that handles multiple button controls, how can I get the name of the control that called the routine?
  23. Replies
    1
    Views
    538

    Using a custom API help

    I've gone to the project properties / References and added the dll for the custom API I need to use.

    Then in the code I put:

    Imports TheMovieDb

    I then get an error that says, Type...
  24. Replies
    0
    Views
    476

    Combobox not updating

    I have a listbox that when the selected index is changed the following code is run:



    Private Sub lbSurveys_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles...
  25. Replies
    3
    Views
    546

    Re: Help with populating datagridview

    Adding

    .Columns("JobID").Visible = False
    .Columns("FileID").Visible = False
    .Columns("FileID1").Visible = False

    to the With statement produces...
  26. Replies
    3
    Views
    546

    Help with populating datagridview

    Here's my code:


    Public Sub PopulateFiles()
    frmFiles.dgvJobImages.Rows.Clear()
    Dim files = From j2f In db.jobs2files
    Join file In db.files On j2f.FileID...
  27. Replies
    3
    Views
    688

    Re: DialogResult help

    Sorry here's my full sub routine code, it's initialized earlier in the code.


    Public Sub DeleteExistingEmployee()
    Dim LoadedEmployee = (From employee In db.employees
    ...
  28. Replies
    3
    Views
    688

    DialogResult help

    Here's my code:



    Dim result As New DialogResult
    result = MessageBox.Show("Are you sure you want to delete " & LoadedEmployee.EmployeeFull_name & "?", "Employee deletion confirmation",...
  29. When does the checklistbox.CheckedItems property get populated?

    I have a checklistbox and I'm running the following code:



    Public Sub ProcessCompanyAssociations()
    Dim clientID As Integer
    Dim fullname As String

    Dim CheckedItems()...
  30. Replies
    5
    Views
    815

    Re: Help with checkedlistbox approach

    Works great thanks, but now I have the following code:



    CheckedItems = clbSurveys.CheckedItems.Cast(Of String).ToArray
    UnCheckedItems = clbSurveys.Items.Cast(Of...
  31. Replies
    5
    Views
    815

    Help with checkedlistbox approach

    If I have a checkedlistbox that has a list of companies, this list corresponds to a database table where clients are associated with companies. The list is populated and checked according to this...
  32. Fill a checkedlistbox with linq to sql query

    Here's my query


    Dim companies = From company In db.clientCompanies
    Select company.ClientCompanyID, company.CompanyName
    Order By CompanyName...
  33. Replies
    1
    Views
    582

    Re: Help with variable type

    I forgot to say that if I put Dim employees outside and uncomment the repeating code, I get an error at Count.

    System.MissingMemberException was unhandled
    Message=Public member 'Count' on type...
  34. Replies
    1
    Views
    582

    Help with variable type

    As you can see from the code below there is a lot of repeated code. I want to move that code outside the if statement as it's performed for each if, but the Dim employees variable I'm declaring is...
  35. [RESOLVED] get value of hidden column of selected row in datagridview

    I'm hiding the "EmployeeID", my Primary key that is part of my datagridviews datasource. I need to get the value of that hidden column of the selected row of my datagridview. How do I go about...
  36. Replies
    0
    Views
    493

    help with linq to sql

    Here's the code


    Private Sub btnFindEmployee_Click(sender As System.Object, e As System.EventArgs) Handles btnFindEmployee.Click
    Dim employees = Nothing
    If chkSrcEmpID.Checked =...
  37. How to call a stored procedure in SQL using LINQ to fill a combobox

    I have a combobox named cbEmpState, I need to call a stored procedure named 'spStateList' and have it fill the combobox. I'm having a hard time finding examples of this online. Can anyone give me...
  38. Replies
    2
    Views
    453

    One more Stored Procedure question

    Here's my SP so far:


    USE [CIS3382Spring2012]
    GO
    /****** Object: StoredProcedure [ml52252].[spTotalRange_ml52252] Script Date: 04/18/2012 10:46:11 ******/
    SET ANSI_NULLS ON
    GO
    SET...
  39. Re: My stored procedure only returns one result, why not all?

    Did it, thanks!
  40. [RESOLVED] My stored procedure only returns one result, why not all?

    USE [CIS3382Spring2012]
    GO
    /****** Object: StoredProcedure [ml52252].[spTotalRange_ml52252] Script Date: 04/18/2012 08:44:55 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER...
Results 1 to 40 of 177
Page 1 of 5 1 2 3 4



Click Here to Expand Forum to Full Width