dcsimg

Search:

Type: Posts; User: Axcontrols2

Page 1 of 2 1 2

Search: Search took 0.04 seconds.

  1. Re: Using Jet.OLEDB.4.0; to read a CSV file. Problems with commas and double-quotes

    I think I'm going to mark this as resolved.

    I just did a quick test with Microsoft.VisualBasic.FileIO.TextFieldParser and it has no problem with the sample CSV I posted above.

    So I'm doing that...
  2. Replies
    12
    Views
    266

    Re: Rename multiple files in one directory

    I can't think of a single command that would do what you want.

    But it's trivial to read the directory (all the file names in the directory) into an array using the GetFiles() function
    ...
  3. Re: Using Jet.OLEDB.4.0; to read a CSV file. Problems with commas and double-quotes

    Thanks Chris.

    Your solution is reading the text file in to a string and parse it in code and insert the data into a grid.

    But I'm not doing that. I'm using OLEDB/JET. Using an OLEDB connection...
  4. Using Jet.OLEDB.4.0; to read a CSV file. Problems with commas and double-quotes

    I've been using JET to read CSV files for many years and never had a problem. But today I get one that contains commas AND double-quotes as part of the data. So, here's an example:-
    ...
  5. Re: Is there a Collection for ContextMenuStrips?

    That does it. Thank you very much.
  6. [RESOLVED] Is there a Collection for ContextMenuStrips?

    When a form loads I can iterate through the controls in a for each loop looking for specific types. But this never includes ContextMenuStrips.

    If, for example, I wanted to change the font used by...
  7. Replies
    5
    Views
    2,035

    Re: Strange behavior on Wine/Linux

    I have quite a large database application that currently only intended for MS Windows. I was just curious about how much work would be needed to make it work in Wine on Linux.
    I was surprised to...
  8. Replies
    5
    Views
    2,035

    Re: Strange behavior on Wine/Linux

    What I'm saying is that double.TryParse("", out d) (empty string) should return false. So that next line should never execute.

    On Windows the tryparse correctly returns false. But running that...
  9. Replies
    5
    Views
    2,035

    Re: Strange behavior on Wine/Linux

    Exactly. I agree. It "Must" always have a value. That's the reason for my question.

    Did you look at my code? Look at the line if (d.ToString() == "") That MessageBox should never show because d...
  10. Replies
    5
    Views
    2,035

    Strange behavior on Wine/Linux

    double d = 0;
    string s = ""; // Empty string

    if (double.TryParse(s, out d) == true)
    {
    if (d.ToString() == "")
    {
    MessageBox.Show("Is Empty String");
    }
    }
  11. Re: Confusing behavior with dates (SQL Svr)

    And here I'm just using sql server management studio to issue a query.

    You can clearly see the query '>2018-12-06'

    and you can clearly see that the results includes records from July !!
    ...
  12. Re: Confusing behavior with dates (SQL Svr)

    I deleted this post because I think the one below does a better job of explaining it.
  13. Re: Confusing behavior with dates (SQL Svr)

    OK. This is what I've found.

    In SQL Server Management studio right click a server instance and select "Properties" and go to the "Advanced" Tab. You'll see the default language is "English".
    ...
  14. Re: Confusing behavior with dates (SQL Svr)

    I'm not on-site anymore so don't have access to their actual server.

    But I'm setting up a VM with the same versions just so I can see if I can reproduce the problem.
  15. Re: Confusing behavior with dates (SQL Svr)

    In the actual application the date is datetime variable and there's a function that converts that to a string in the 'YYYY-MM-DD' format. It's been running for around 10 years 24/7/365

    When the...
  16. Confusing behavior with dates (SQL Svr)

    I'm in the UK and to avoid any date confusion I use command.parameters to build my sql queries.

    But I've 'inherited' a few legacy apps that use this syntax


    SELECT * FROM SomeTable WHERE...
  17. Replies
    12
    Views
    954

    Re: Alternative to OUTER JOIN (SELECT....

    I've never used a Sub Query in the column list before. Looks weird.

    But. That works. Thank you. :)

    It's an Inventory program and many years ago each inventory item had a 'Option' field which...
  18. Replies
    12
    Views
    954

    Re: Alternative to OUTER JOIN (SELECT....

    @FunkyDexter. First let me thank you for your input. Really appreciated.


    The 'Armada' device I'm referring to is a Western Digital 'MyCloud' storage device which has MySQL 5.1 built in. It has...
  19. Replies
    12
    Views
    954

    Re: Alternative to OUTER JOIN (SELECT....

    Tested that. It does work on most 'sensible' servers but on a low powered Armada device the ExecuteReader() fails with an error indicating that the /tmp/ folder isn't big enough.

    I can increase...
  20. Replies
    12
    Views
    954

    Re: Alternative to OUTER JOIN (SELECT....

    Sorry. You're right. I just keyed in that 'example' query without double checking. It should have been "ON" not "WHERE". Something like:

    SELECT col_a, col_b, col_c, b_id FROM TABLE_A
    LEFT OUTER...
  21. Replies
    137
    Views
    7,755

    Re: LET MS know you are using VB6

    Before VB6 I programmed mostly in C

    When VB5/6 came along it was great - In VB6 I could knock out new apps so quick I was sneaking off home an lunch time. :)

    I resisted the change to .NET for...
  22. Replies
    12
    Views
    954

    Re: Alternative to OUTER JOIN (SELECT....

    CREATE TEMPORARY TABLE B SELECT DISTINCT b_id FROM TABLE_B;
    SELECT col_a, col_b, col_c, b_id FROM TABLE_A
    LEFT OUTER JOIN B ON B.b_id = TABLE_A.id


    I tried that - thought it would work. But no....
  23. Replies
    12
    Views
    954

    Alternative to OUTER JOIN (SELECT....

    I use "OUTER JOIN" because I want all rows from TABLE_A even if no matching row in B exists.
    I use "JOIN ( SELECT DISTINCT" because I only want one row from B if more than one exists.



    ...
  24. Replies
    15
    Views
    1,012

    Re: MySQL. Get records affected by UPDATE

    Thanks for the posts guys. I've been away so didn't respond earlier. Sorry. But I really do appreciate your comments/suggestions.

    If I have read a unique Key then of course I know whether to...
  25. Replies
    15
    Views
    1,012

    Re: MySQL. Get records affected by UPDATE

    Ha! Made my day! :)
  26. Replies
    15
    Views
    1,012

    Re: MySQL. Get records affected by UPDATE

    @FunkyDexter

    I'm interested in what you said about disk hit being a bottle neck. This application was originally written (by me) back in the days of ISDN before broadband. So trips to the server...
  27. Replies
    15
    Views
    1,012

    Re: MySQL. Get records affected by UPDATE

    Thanks guys.

    Sorry. I neglected to say that the application can connect to JET, Microsoft SQL Server or MySQL. I try to write db agnostic code. Obviously different connectors but as far as...
  28. Replies
    15
    Views
    1,012

    MySQL. Get records affected by UPDATE

    Ha! When you read that title you came here to tell me to use the return value of ExecuteNonQuery. Well, that's what I have been using for years. But, it seems, we can't trust it anymore.

    For years...
  29. Re: "Save", "OK", "Make it so" still relevant today?

    In the current version of my software, the user must click the 'Save' button when he's done. If he tries closing without saving then a popup appears asking if he really wants to exit without saving....
  30. Re: "Save", "OK", "Make it so" still relevant today?

    Yes. Keying in an SQL statement int SSMS I wouldn't want it to automatically click its own [Excute !] button before I'd double checked the syntax.



    Makes you want to make a custom message box...
  31. Re: "Save", "OK", "Make it so" still relevant today?

    It's an inventory program. It's a slow moving industry. People don't like change Many of these are big clunky things designed in the 70's and shoe-horned into current Windows UI.

    But the old guys...
  32. "Save", "OK", "Make it so" still relevant today?

    I'm making a new version of a program that's been around for nigh on 20 years.

    Let's not discuss whether a diskette button is relevant today - that's already been discussed to death.

    Ignoring...
  33. Re: MySql/MariaDB - Should I make all my database and table names lower case?

    Thanks, si_

    I decided to create my database and all tables with lower case names and use exclusively lower case database and table names in my queries.

    I did some testing with various settings...
  34. MySql/MariaDB - Should I make all my database and table names lower case?

    I have a windows application using Microsoft SQL Server.

    my tables names are things like "tblSomeTable", "tblSomeOtherTable" using some upper case characters.

    My application connects to the...
  35. Re: [RESOLVED] I don't like RED (DELETE FROM TABLE WHERE COLOR = 'RED' .. but not all

    You're right. I didn't mention the platform - Sorry. I kind if forgot about jet till you mentioned that join syntax and it reminded me. My application uses IDBConnection and can connect to either...
  36. Replies
    1
    Views
    1,014

    Re: SQLite Database Locked - Going Bonkers

    I don't use datatables so I don't know if this is relevant.

    I use a connection, a command object and a DataReader to read the data.

    But SQLite has a weird 'feature'. If you use a DataReader...
  37. Re: How to include framework into exe file?

    I never build an application targeting the very latest framework unless I need some feature of that framework AND have control over the target machines so have no problem installing the necessary...
  38. Replies
    5
    Views
    633

    Re: PC USB Sensor temperature sensor

    I don't know what make, model your particular device is, but USB sensors I've seen are usually very simple low cost devices which appear as simple com/serial port meaning you can read the data using...
  39. Re: [RESOLVED] I don't like RED (DELETE FROM TABLE WHERE COLOR = 'RED' .. but not all

    @FunkyDexter

    Do all DB's support that JOIN syntax? It's been a while since I worked with JET but I seem to remember it couldn't delete from a JOIN'ed table?
  40. Any benefit in holding an open connection or trust connection pooling

    I have a number of different functions where each function does a specific, small, tasks in a database.

    Each of those functions can accept a connection object as an argument or, if no connection...
Results 1 to 40 of 45
Page 1 of 2 1 2



Featured


Click Here to Expand Forum to Full Width