Search:

Type: Posts; User: Mark@SF

Page 1 of 12 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    7
    Views
    244

    Re: Cast DataTable to get its Update method?

    The author of the CodeGuru article was David Catherman and per the below link, his extended BindingSource article was part of a four-part project.
    ...
  2. Replies
    7
    Views
    244

    Re: Cast DataTable to get its Update method?

    paul and shaggy -

    I know my question is a weird one because it's about code that I didn't write. But, the example that is in the referenced link is very interesting. It was published on the...
  3. Replies
    7
    Views
    244

    Cast DataTable to get its Update method?

    I came across an article (with code) that described how to extend a BindingSource component to add some useful features.
    ...
  4. Replies
    16
    Views
    610

    Re: PrintCommunication COM error

    At this point, I'm leaving in the PrintCommunications = False statements and leaving out the PrintCommunications = True statements. The code runs without raising any errors and the PageSetup...
  5. Replies
    16
    Views
    610

    Re: PrintCommunication COM error

    My application has several sheets and several charts and I'm performing PageSetup on each of them. Setting PrintCommunications = False make the PageSetup execute a lot faster (haven't benchmarked...
  6. Replies
    16
    Views
    610

    Re: PrintCommunication COM error

    One more time for the attachment...

    185432
  7. Replies
    16
    Views
    610

    Re: PrintCommunication COM error

    I'm trying to upload the attachment a second time, but I don't see the "go advanced" option.

    The Worksheet object does not have a PrintCommunication property (per IntelliSence).

    Passing the...
  8. Replies
    16
    Views
    610

    Re: PrintCommunication COM error

    I am using early binding.
  9. Replies
    16
    Views
    610

    Re: PrintCommunication COM error

    jmc -

    Thanks for taking a look at this question. I modified my code to declare the PageSetup and Application objects per your suggestion. I still am getting the error when setting the...
  10. Replies
    16
    Views
    610

    PrintCommunication COM error

    I am having difficulty with the Application.PrintCommunication property with early binding.

    In the code below, the first DirectCast statement executes without any issues but the second DirectCast...
  11. Replies
    7
    Views
    367

    VS 2019 Re: Checking data type and early binding

    ChrisE -



    Thank you.
  12. Replies
    7
    Views
    367

    VS 2019 Re: Checking data type and early binding

    I have discovered that this also works...



    If Not TypeOf CType(xlSheet.Cells(3, 1), Excel.Range).Value Is Date Then
    strMSG = "The data does not have the expected structure - no data...
  13. Replies
    7
    Views
    367

    VS 2019 Re: Checking data type and early binding

    Delaney -



    In post #2, I showed a (failed) code snippet that used CType cast. Why does DirectCast work and CType does not?

    Thanks for your solutions.
  14. Replies
    7
    Views
    367

    VS 2019 Re: Checking data type and early binding

    Here's what I've (unsuccessfully) tried with early binding.



    If CType(xlSheet.Cells(3, 1), Excel.Range).Value.GetType <> GetType(System.DateTime) Then
    strMSG = "The data does not have the...
  15. Replies
    7
    Views
    367

    VS 2019 Checking data type and early binding

    I would like to check a cell in an Excel worksheet to see if it is date-type data.

    With late binding (Option Strict Off), the following code works.



    If xlSheet.Cells(3, 1).Value.GetType <>...
  16. VS 2019 Re: Binding TextBox using Format and Parse events

    ...thanks, I learned something!
  17. VS 2019 [RESOLVED] Binding TextBox using Format and Parse events

    I need some help for how to implement a code example from the following Microsoft link.

    https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.converteventargs?view=windowsdesktop-6.0
    ...
  18. Replies
    10
    Views
    418

    VS 2019 Re: How to retrieve a list of DataAdapters

    That answers my question. Thanks.
  19. Replies
    10
    Views
    418

    VS 2019 Re: How to retrieve a list of DataAdapters

    I know and I was editing that comment as you were typing your reply. What is true is that you cannot change a column's datatype after filling the datatable. :)
  20. Replies
    10
    Views
    418

    VS 2019 Re: How to retrieve a list of DataAdapters

    Because I'm creating "dummy" DataColumns, I have to also explicitly create the DataColumns in my DataTables before calling the DataAdapter.Fill method. Note the...
  21. Replies
    10
    Views
    418

    VS 2019 Re: How to retrieve a list of DataAdapters

    I always try to simplify/streamline my code development and maintenance work. On way that I do this is to strive to implement code that can be multi-purpose. For example, lots of my applications...
  22. Replies
    10
    Views
    418

    VS 2019 How to retrieve a list of DataAdapters

    How can I retrieve a list of the DataAdapters that are in an application that has a Dataset with multiple DataTables (each DataTable has its own DataAdapter)? It does not appear that they...
  23. Re: Get the value of DefaultValue property from schema for a field in an SQLite table

    Here's the solution...



    strSQL = "PRAGMA table_info(Plants)"
    Using cmd As New SQLite.SQLiteCommand(strSQL, con)
    rdr = cmd.ExecuteReader
    End Using
    tblTemp.Load(rdr)
    For i As Integer = 0...
  24. [RESOLVED] Get the value of DefaultValue property from schema for a field in an SQLite table?

    I am using SQLite (System.Data.SQLite for .NET v1.0.116.0) for an application and having trouble getting the DefaultValue property values for fields from the table schema of the SQLite database.
    ...
  25. Replies
    17
    Views
    25,044

    Re: Retrieve Access AutoNumber Value After Insert

    Thank you.
  26. Replies
    17
    Views
    25,044

    Re: Retrieve Access AutoNumber Value After Insert

    jmc -

    Thank you for your excellent tutorial!

    I was curious about the auto-generated code, so I put the following statements at the end of the Form1.Load method:

    ...
  27. Replies
    1
    Views
    312

    VS 2019 Validating a databound control

    I have a form that only has one control - a textbox (txtAccount) - and it is bound to a BindingSource with the binding's DataSourceUpdateMode property set to OnValidation.

    I've added a button...
  28. VS 2019 Re: NoNullAllowedException error handling

    Thanks, jmc.

    For anyone interested, here's my solution...



    '...the Validate() method of the form verifies the value of the control losing focus by causing the Validating and Validated events...
  29. VS 2019 [RESOLVED] NoNullAllowedException error handling

    I have a scenario that is raising the System.Data.NoNullAllowedExceptionexception and I don't understand how to intercept (trap) it.

    My form has 2 text boxes and both are bound to columns that...
  30. Replies
    2
    Views
    953

    VS 2019 Re: ReportViewer and Microsoft PDF printing

    I can get the left margin of the PDF to be correct with the following code which sets the ReportViewer1.PrinterSettings properties and then calls the ReportViewer1.PageSetupDialog method to display...
  31. Replies
    2
    Views
    953

    VS 2019 Re: ReportViewer and Microsoft PDF printing

    An update on this topic...

    After my report has rendered (visible on my PC screen), my objective is to print the rendered ReportViewer object to a PDF file.

    At this point, if I simply click the...
  32. Replies
    2
    Views
    953

    VS 2019 ReportViewer and Microsoft PDF printing

    I'm having trouble with margins when using the "Microsoft Print to PDF" printer to create a PDF document via the Microsoft ReportViewer.

    Even though I am setting the margins for my reports (see...
  33. Re: RC6 - New encrypt option for Sqlite DB: SqlCipher

    @schmidt -

    I've converted several of my older MS Access database applications to SQLite. These applications have all used un-encrypted MS Access databases. I'm also using VS Community 2019...
  34. Replies
    4
    Views
    617

    VS 2019 Re: Cast to DataTable

    @paul -

    Thank you for your help with my question, including the extension method.

    Yes, I know that the indexDetails has the schema details. I was looking for how to work with columnsIWant data...
  35. Replies
    8
    Views
    1,031

    VS 2019 Re: Need help converting VBA to VB.Net

    @ChrisE -

    Thank you for following up with a DAO solution. I really appreciate your help!

    I see in your solution that Option Strict must be Off for it to work and with this compiler directive,...
  36. Replies
    4
    Views
    617

    VS 2019 Cast to DataTable

    I came across this code example and would like use it, but need to get the result into a DataTable.


    Dim restrictions() As String = {Nothing, Nothing, Nothing, Nothing, tdf.Name}
    Dim...
  37. Replies
    8
    Views
    1,031

    VS 2019 Re: Need help converting VBA to VB.Net

    @ChrisE -

    Thank you. Your suggestion works.

    Since my question was for how to use DAO to get the fields of an index, I'm going to leave this thread open to see if there's solution for the...
  38. Replies
    8
    Views
    1,031

    VS 2019 Re: Need help converting VBA to VB.Net

    @paul -

    Thank you for your help.

    When I tried your suggestion, Intellisense shows the following error:

    Error BC30002 Type 'TableDef.Fields' is not defined.


    For Each idx As Index In...
  39. Replies
    8
    Views
    1,031

    VS 2019 Re: Need help converting VBA to VB.Net

    @wes4dbt -

    Thanks for taking a look at this with me.

    I'm declaring idx as a Microsoft.Office.Interop.Access.Dao.Index object. Here's the explicit declaration in my For...Next loop.



    For...
  40. Replies
    8
    Views
    1,031

    VS 2019 Need help converting VBA to VB.Net

    I need some help to convert some VBA code to VB.Net code.

    Here is the VBA code...



    Function DescribeIndexField(tdf As DAO.TableDef, strField As String) As String
    'Purpose: Indicate if the...
Results 1 to 40 of 451
Page 1 of 12 1 2 3 4



Click Here to Expand Forum to Full Width