| View previous topic :: View next topic |
| Author |
Message |
Alex NeoBooker
Joined: 04 Mar 2006 Posts: 596
|
Posted: Mon Jun 08, 2009 1:33 pm Post subject: DBPOpenTable doesn't work correctly |
|
|
Hello,
When I want to open the database "aux"and the table "aux" my Neobook program bugs. I don't know why, here is the command:
| Code: | dbpOpenDatabase "aux" "Provider=MSDASQL.1;Driver=SQLite3 ODBC Driver;Database=[PubDir]aux.db;CursorLocation=adUseServer"
dbpOpenTable "aux" "aux" "" |
Thanks
Alex |
|
| Back to top |
|
 |
beno NeoBooker

Joined: 01 Apr 2005 Posts: 805 Location: México
|
Posted: Mon Jun 08, 2009 3:51 pm Post subject: |
|
|
Hi,
Have you tried it with a different name than "aux".
There is a message somewhere in the forum enlisting invalid words for databases and database fields. I guess it was provided by Gaev. But I am not able to find it.
HTH,
beno _________________ ---------
http://www.benitoestrada.net |
|
| Back to top |
|
 |
Alex NeoBooker
Joined: 04 Mar 2006 Posts: 596
|
Posted: Tue Jun 09, 2009 12:14 am Post subject: |
|
|
Hi beno,
Yes, if I write "au" then it works.
I think it is this: http://developer.mimer.com/validator/sql-reserved-words.tml
But I can't find the word "aux".
And I don't know why, when I do | Code: | | FileExists "![PubDir]aux.db" "[teh]" | it says "True" but the database doesn't exists!
Thanks
Alex |
|
| Back to top |
|
 |
Gaev NeoBooker

Joined: 01 Apr 2005 Posts: 4322 Location: Toronto, Canada
|
Posted: Tue Jun 09, 2009 4:54 am Post subject: |
|
|
Could be something to do with the fact that AUX is used in MS DOS for a device name (another name for the first serial port, COM1:)
Similarly, PRN: is another name for the first parallel port, LPT1:
A list of device names (to be avoided as file names) ...
AUX
COM1
COM2
COM3
COM4
CON
LPT1
LPT2
LPT3
NUL _________________ Gaev
http://www.scriptedlogic.com/ |
|
| Back to top |
|
 |
Alex NeoBooker
Joined: 04 Mar 2006 Posts: 596
|
Posted: Tue Jun 09, 2009 5:06 am Post subject: |
|
|
Hello Gaev,
Excellent thanks, I didn't know that, is there a full list with some words that can't be used? Or it is complete?
Thanks
Alex |
|
| Back to top |
|
 |
beno NeoBooker

Joined: 01 Apr 2005 Posts: 805 Location: México
|
Posted: Tue Jun 09, 2009 5:33 am Post subject: |
|
|
Hi,
You can precede all your names with something unique, so you will never fail in a similar situation again. Something like dbpOpenDatabase "kar_aux" "...etc..."
Just a idea...
beno _________________ ---------
http://www.benitoestrada.net |
|
| Back to top |
|
 |
Alex NeoBooker
Joined: 04 Mar 2006 Posts: 596
|
Posted: Tue Jun 09, 2009 6:03 am Post subject: |
|
|
Hi beno,
Yes, exactly, I didn't think about this. It is a very very good idea, thanks.
Alex |
|
| Back to top |
|
 |
|