Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - MSAccess DataProvider
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MSAccess DataProvider

 Post Reply Post Reply
Author
Message
xmastree View Drop Down
Newbie
Newbie


Joined: 08 November 2005
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote xmastree Quote  Post ReplyReply Direct Link To This Post Topic: MSAccess DataProvider
    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

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2005 at 11:29am
Hi,

Just add your password to the end of the connection string, like:

ConnectionStr = ConnectionStr + ";Jet OLEDB:Database Password=test1;"


After that .dataprovider.Open should work fine.

--
WBR,
Serge
Back to Top
xmastree View Drop Down
Newbie
Newbie


Joined: 08 November 2005
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote xmastree Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2005 at 1:23pm

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

Back to Top
xmastree View Drop Down
Newbie
Newbie


Joined: 08 November 2005
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote xmastree Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2005 at 2:29pm

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.

 

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2005 at 2:48pm
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
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2005 at 12:14pm
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
Back to Top
xmastree View Drop Down
Newbie
Newbie


Joined: 08 November 2005
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote xmastree Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2005 at 6:27am

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

Back to Top
xmastree View Drop Down
Newbie
Newbie


Joined: 08 November 2005
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote xmastree Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2005 at 9:06am

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.

 

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2005 at 9:49am
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.