Hi,
It seems that my wxSQLite3Database::Open() does not work for files with Spaces in them.
For example it works fine for data.db but not for "Data Base.db"
Si this a bug? If its normal how can I use wxSQLite3 with filenames spaced?
Thanks!
wxSQLite3 opening files with space
- evstevemd
- Part Of The Furniture
- Posts: 2408
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
wxSQLite3 opening files with space
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: wxSQLite3 opening files with space
I don't think it's related to wxSQLite3. The filename of the database file is passed to SQLite in UTF-8 encoding but otherwise unchanged. Opening a file with a name which contains spaces should definitely work. I tested it successfully under Windows.evstevemd wrote:It seems that my wxSQLite3Database::Open() does not work for files with Spaces in them.
For example it works fine for data.db but not for "Data Base.db"
Si this a bug? If its normal how can I use wxSQLite3 with filenames spaced?
If it doesn't work for you there has to be a different explanation. Does the filename include path information? If yes, make sure the path exists in your file system. What happens when you execute your application? Does your application crash? If yes, can you debug the application to find the location where it crashes? Or do you get an exception? If yes, what is the message text? Or which other phenomenon do you experience?
Regards,
Ulrich
- evstevemd
- Part Of The Furniture
- Posts: 2408
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: wxSQLite3 opening files with space
I thought so but I checked with SQlite3 docs they say as you said: it should work!utelle wrote:I don't think it's related to wxSQLite3. The filename of the database file is passed to SQLite in UTF-8 encoding but otherwise unchanged. Opening a file with a name which contains spaces should definitely work. I tested it successfully under Windows.evstevemd wrote:It seems that my wxSQLite3Database::Open() does not work for files with Spaces in them.
For example it works fine for data.db but not for "Data Base.db"
Si this a bug? If its normal how can I use wxSQLite3 with filenames spaced?
App does not crash. As the matter of fact changing name to one without space works fine. There is where I get puzzled. Let me check again if I can discover anything!utelle wrote: If it doesn't work for you there has to be a different explanation. Does the filename include path information? If yes, make sure the path exists in your file system. What happens when you execute your application? Does your application crash? If yes, can you debug the application to find the location where it crashes? Or do you get an exception? If yes, what is the message text? Or which other phenomenon do you experience?
Regards,
Ulrich
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: wxSQLite3 opening files with space
This is indeed strange. If wxSQLite3Database::Open fails a wxSQLite3Exception is thrown. Please catch this exception and report the error code and message here. Use code like in the minimal sampleevstevemd wrote:App does not crash. As the matter of fact changing name to one without space works fine.
Code: Select all
...
catch (wxSQLite3Exception& e)
{
cerr << e.GetErrorCode() << ":" << (const char*)(e.GetMessage().mb_str()) << endl;
}
I'll certainly try to help but without being able to reproduce the problem I have no clue what's going wrong in your application.evstevemd wrote:There is where I get puzzled. Let me check again if I can discover anything!
Regards,
Ulrich
- evstevemd
- Part Of The Furniture
- Posts: 2408
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: wxSQLite3 opening files with space
I found a bug in my code. All codes with call to Open have been deleted.
However, I had redirected exceptions and forgot to check it in CodeLite.
Sorry for my stupid mistake and thanks for your hand
However, I had redirected exceptions and forgot to check it in CodeLite.
Sorry for my stupid mistake and thanks for your hand
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?