MySQL Forums
Forum List  »  Newbie

Re: ado and table with "-"
Posted by: Phillip Ward
Date: September 03, 2018 05:27AM

Quote

CN.ConnectionString = "DRIVER={MySQL ODBC 5.3 ANSI Driver};" & "SERVER=192.168.1.3;" & " DATABASE=test;" & "UID=root;PWD=xxxx;"

Do not connection applications using the root user.
Create a dedicated account for the application to use and grant that account the permissions that the application requires.

Basic principle: The Root account should exist only to give you, the DBA, the power to clean up the mess made by an Application.

Quote

'RS.Open ...

That first, single-quote, character indicates that the entire line is a comment and, as such, it is not executed, which is why it gives you no error!

Quote

RS.Open "select * from 08-2018" ...

Avoid "select *" in application code. It's a potential performance-killer.

Avoid special characters in table (and other) names. As you've discovered, they cause problems. :-)

Yes, you can get round the problem by wrapping such names in back-ticks, but it's far, far, easier if you avoid them completely.

Avoid partitioning your data horizontally until you really, really have to.
MySQL is perfectly capable (with proper indexing) of holding many years-worth of data in a single table instead of having a separate table for each and every month. The latter design scales poorly, is a maintenance nightmare and can hit all sorts of problems when you decide that you do need to run a [reporting] query across lots and lots of such tables (is the absolute limit still 61 tables?).

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
September 01, 2018 08:39AM
September 01, 2018 10:38AM
September 01, 2018 01:39PM
September 01, 2018 03:37PM
Re: ado and table with "-"
September 03, 2018 05:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.