Search results

  1. J

    Resolved Deleting a DataTable Record w/ LINQ

    Many thanks to all of you for your explanations! Makes a lot more sense now and it's working the way I'd like
  2. J

    Resolved Deleting a DataTable Record w/ LINQ

    Here's what I'm trying at the moment but still getting the same error Dim DatabaseAuxiliary_Table_Query = From ADG_Auxiliary_Record In DatabaseAuxiliary_Table.AsEnumerable() Select ADG_Auxiliary_Record Where...
  3. J

    Resolved Deleting a DataTable Record w/ LINQ

    Could I ask you to specify where in my code I would use .ToArray? Regarding restricting the LINQ query to non-deleted records, I modified my query as follows but I am still getting the 'DeletedRowInaccessibleException' exception. Dim DatabaseAuxiliary_Table_Query = From...
  4. J

    Resolved Deleting a DataTable Record w/ LINQ

    I've got a DataTable that I need to delete some rows from; I'm trying the following code but getting some unexpected results Dim DatabaseAuxiliary_Table_Query = From ADG_Auxiliary_Record In DatabaseAuxiliary_Table.AsEnumerable() Select ADG_Auxiliary_Record _...
  5. J

    Writing DataTable (100+ Columns) Back To MS Access

    Hi I've been using the following code with my .NET application which reads information from Access Dim MSAccess_Connection As OleDb.OleDbConnection Dim strMSAccess_Connection_SQL As String = "" Dim strDatabaseTable_SQL As String = "" Dim MSAccess_DatabaseTable As New DataTable...
  6. J

    Updating A LINQ Query

    OK, but if I try to set Alarm_Record.Alarm - I am told that it is a read-only property... and I don't seem to have any other way to access the fields because Alarm_Record.Field isn't valid...
  7. J

    Updating A LINQ Query

    I'm not that familiar (obviously) with LINQ - could you provide the syntax?
  8. J

    Updating A LINQ Query

    Hi I've got this LINQ query Dim WindowAlarmList_Table_Query = From Alarm_Record As DataRow In WindowAlarmList_Table.AsEnumerable _ Select Alarm = Alarm_Record.Field(Of String)("Alarm"), _...
  9. J

    LINQ Select Distinct From Datatable

    Ok, thanks for clarifying that... just not clear on how I'd select distinct fields?
  10. J

    LINQ Select Distinct From Datatable

    I'm trying to run a DISTINCT query to return a unique listing from my datatable... Dim Compound_Blocks_Table_Query = From Compound_Block_Record In Compound_Blocks_Table.AsEnumerable Select Compound_Block_Record Order By...
  11. J

    Group Query Question

    Hi all Hoping that someone can help me figure this out... I believe that the following would be a LINQ "Select" Query? Dim Query = From Record In Table.AsEnumerable() Select Record Where Record.Field(Of String)("FieldName") = SomeString With this, I'm able to refer to any field in the...
  12. J

    StreamReader On CSV => List (Of String) - Leading Spaces

    OK, I'm trying this strIA_Block_Parameters = IA_Block_Parameters_FileStreamReader.ReadToEnd.Split(ControlChars.CrLf, StringSplitOptions.RemoveEmptyEntries) but ControlChars.CrLf doesn't compile, yielding an error of 'Argument matching parameter separator narrows to string to 1-dim array of Char'
  13. J

    StreamReader On CSV => List (Of String) - Leading Spaces

    Turns out it's actually a carriage-return or something similar...
  14. J

    StreamReader On CSV => List (Of String) - Leading Spaces

    I've got a CSV that's just a single column of text like so Param1 Param2 Param3 and so on... I'm trying to use Dim strIA_Block_Parameters As New List(Of String) Dim IA_Block_Parameters_FileStream As FileStream = New FileStream(strIA_Block_Parameters_FilePath...
  15. J

    Populating DataGridView from BackgroundWorker - Invoking

    Couldn't get this to work UpdateDataGridView.Invoke(New UpdateDataGridViewCallback(AddressOf UpdateDataGridView), new string(){Column1, Column2}) with Private Delegate Sub UpdateDataGridViewCallback(ByVal text As String()) Private Sub UpdateDataGridView(ByVal text As String()) but I tried...
  16. J

    Populating DataGridView from BackgroundWorker - Invoking

    So add that to the end of the .Invoke statement?
  17. J

    Populating DataGridView from BackgroundWorker - Invoking

    Hi all I'm trying to do this in a multi-thread DataGridView.Rows.Add({Column1, Column2}) I created a delegate and the AddressOf sub Private Delegate Sub UpdateDataGridViewCallback(ByVal text As String()) Private Sub UpdateDataGridView(ByVal text As String()) DataGridView.Rows.Add(text)...
  18. J

    Question Retrieving Table List - One DB Errors, One DB Does Not...

    Hi all I've got a program that interfaces with an MS Access database, using the following conne strMSAccess_Connection_SQL = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & strDatabaseFilePath MSAccess_Connection = New OleDbConnection(strMSAccess_Connection_SQL) MSAccess_Connection.Open()...
  19. J

    Question Can Visual Studio Express Open Visual Studio Projects?

    A co-worker of mine has Visual Studio 2008 with Visual Basic 2008 9.0.21022.8 RTM... I have Visual Studio Express 2008 installed... When I tried opening the project he sent me, I got an error stating that the .vbproj isn't supported by my version... Thanks!
  20. J

    Question Connection String for Both MS Access 2003 & 2007?

    Thanks... I found there what I am doing presently (4.0 and 12.0)... granted, I'm far from an expert but I didn't see anything that discussed being able to use the same string for both 2003 & 2007... Thanks!
Top Bottom