MSAccess DataProvider |
Post Reply |
Author | |
xmastree
Newbie Joined: 08 November 2005 Status: Offline Points: 14 |
Post Options
Thanks(0)
Posted: 08 November 2005 at 12:53pm |
Hi, I'm New to the xtreme calendar , and have been evaluating the ActiveX control under VB 6, I'm providing a connection string to a password protected MDB but am unable to open the database. with calendar call .setprovider (ConnectionStr) if not .dataprovider.Open then call .dataprovider.Create end if end with works fine when password is not required as in events.mdb as per supplied example but not when database is protected???. Any ideas, otherwise will have to use xml or binary file thanks in advance |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
Just add your password to the end of the connection string, like:
After that .dataprovider.Open should work fine. -- WBR, Serge |
|
xmastree
Newbie Joined: 08 November 2005 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Hi, I should have made it clearer , I'm actually passing in a connection string with Jet OLEDB:Database Password=mypassword supplied. but the database is never opened and always falls through into the call dataprovider.create. Is there an error object I can view to get the actual reason why the open call fails ?. thanks in advance |
|
xmastree
Newbie Joined: 08 November 2005 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Hi, Ok the reason why the calendar fails to connect and open a password database is that the password in the connection string has a cut off limit of 13 characters so if your password is longer than 13 characters theres no way the calendar can open the database , let alone create the required tables.
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
Not sure about 13 characters limit - will recheck also. However I've just realized that the problem could happen when your password contains upper case characters. It is a problem inside the component and it will be fixed in the next version. -- WBR, Serge |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
Regarding 13 characters limit -- see couple links below. That seems to be a problem with Access databases itself. http://support.microsoft.com/default.aspx?scid=kb;en-us;Q246 033 http://support.microsoft.com/default.aspx?scid=%2Fsupport%2F access%2Fcontent%2Fsecfaq.asp#_Toc493299666 -- WBR, Serge |
|
xmastree
Newbie Joined: 08 November 2005 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Hi, The thing is that I can connect to a password protected database with passwords longer than 13 characters using the access prompt or from code, but not when using the calendar dataprovider . I'm using Access 2000 MDB database format. thank you for your help, I'll just restrict the length of the password. Cheers |
|
xmastree
Newbie Joined: 08 November 2005 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Hi, What has been throwing me were the Open and Create calls of the dataprovider. 1. the call to setprovider converts the password to lowercase so connection fails on an existing password protected database 2. if you create a new password protected database using setprovider the database is created and the calendar works fine . events can be added or deleted etc. but again the password is all lowercase. 3. This is what has been throwing me, if the database exists it can be either password protected or unprotected , the call to Open succeeds, but the required tables are not present so the calendar is inoperable. also a call to Create on an existing database does NOT create the required underlying database tables. So to make the calendar work the tables must exist prior to the Open. this of course is not a problem if the database is created from scratch. So dataprovider.Create creates the entire MDB or else it does nothing. by the way the password length does not seem to be affecting the calendar once it is understood that the DB has to be created from scratch and also that the password must be lowercase Cheers.
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
1, 2) regarding lower case -- I've already answered above that the problem is known and will be fixed for the next version. 3) If you have a customized database you have 2 choices -- whether to adapt your DB to the structure required by calendar or to write your own data provider. Adaptation should be performed only once and manually. I don't think you want the automatic process which could mess all "unnecessary" data. The required structure could be taken from the newly created DB as you already know. So, I don't think it is a big problem, except that there could be also added a validation on required db structure existence during the Open operation. -- WBR, Serge |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |