A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Create secıred database via code ADOX?



 
 
Thread Tools Display Modes
  #1  
Old September 2nd, 2004, 10:00 PM
Özden Irmak
external usenet poster
 
Posts: n/a
Default Create secıred database via code ADOX?

Hi,

Does anybody have any sample code to create a database via ADOX catalog
object and join it to a workgroup file?

Thanks,

Özden


  #2  
Old September 3rd, 2004, 11:14 AM
Brendan Reynolds
external usenet poster
 
Posts: n/a
Default

I looked into this but didn't get very far. ADOX help isn't functioning on
my system, so I'm afraid I don't think there's much more I can do, but this
is as far as I got, if you want to investigate it futher yourself ...

Public Sub CreateDatabaseADOX()

'Connection string below copied from a UDL file.
'Provider=Microsoft.Jet.OLEDB.4.0;
'Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\db1.mdb;
'Persist Security Info=False;
'Jet OLEDB:System database=C:\Documents and Settings\Brendan Reynolds\My
Documents\Custom.mdw

Dim cat As ADOX.Catalog
Dim strConnect As String

Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\ADOXTest.mdb;" & _
"Persist Security Info=False;" & _
"Jet OLEDB:System database=C:\Documents and Settings\Brendan
Reynolds\My Documents\Custom.mdw"
cat.Create strConnect

End Sub

Code fails with following error message ...

-2147217887 (80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Özden Irmak" ozdenirmakatisnetdotnetdottr wrote in message
...
Hi,

Does anybody have any sample code to create a database via ADOX catalog
object and join it to a workgroup file?

Thanks,

Özden




  #3  
Old September 3rd, 2004, 12:08 PM
Özden Irmak
external usenet poster
 
Posts: n/a
Default

Dear Brendan,

Thank you for your help...Let me describe you what I want to achieve...

I've to create some queries from 2 different databases (A query which joins
different tables from both databases) and those 2 databases are secured with
a workgroup file. No matter what I tried, I couldn't find a way to do it. I
have to do this via code and these are the methods that I tried :

1) Tried to link tables onto a common database. This slapped onto my face
when I found there is no option to specify username and system database
while creating the linked tables via ADO. (Nor you can do from inside Access
manually)

2) Tried to import the tables onto a common database. This also slapped onto
my face when I found that this new common database does not only import the
tables but their security datas where I get "You don't have Open/Read data
right." when I try to open the imported tables via ADO. The Interesting
thing is that when I open this database with Access 2003 it does very well
browse through the tables and records that I imported without the need of
any kind of special user right !?!?!?!

3) I tried to create a common database which is joined to a system database
and this has also slapped onto my face.

What on earth does access does not provide me a way to do this? There is
also no documentation in anywhere on Access and WWW about this situation?

I got really mad after all my hardwork got stuck in a stupid problem like
this...

Please let me know if any solution comes into your mind and thanks again for
your attention on my issue...

Özden

"Brendan Reynolds" brenreyn at indigo dot ie wrote in message
...
I looked into this but didn't get very far. ADOX help isn't functioning on
my system, so I'm afraid I don't think there's much more I can do, but
this
is as far as I got, if you want to investigate it futher yourself ...

Public Sub CreateDatabaseADOX()

'Connection string below copied from a UDL file.
'Provider=Microsoft.Jet.OLEDB.4.0;
'Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\db1.mdb;
'Persist Security Info=False;
'Jet OLEDB:System database=C:\Documents and Settings\Brendan
Reynolds\My
Documents\Custom.mdw

Dim cat As ADOX.Catalog
Dim strConnect As String

Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\ADOXTest.mdb;" & _
"Persist Security Info=False;" & _
"Jet OLEDB:System database=C:\Documents and Settings\Brendan
Reynolds\My Documents\Custom.mdw"
cat.Create strConnect

End Sub

Code fails with following error message ...

-2147217887 (80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Özden Irmak" ozdenirmakatisnetdotnetdottr wrote in message
...
Hi,

Does anybody have any sample code to create a database via ADOX catalog
object and join it to a workgroup file?

Thanks,

Özden






  #4  
Old September 3rd, 2004, 12:41 PM
Brendan Reynolds
external usenet poster
 
Posts: n/a
Default

Are these two databases secured with the same workgroup file, or is each
database secured with a different workgroup file?

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Özden Irmak" ozdenirmakatisnetdotnetdottr wrote in message
...
Dear Brendan,

Thank you for your help...Let me describe you what I want to achieve...

I've to create some queries from 2 different databases (A query which

joins
different tables from both databases) and those 2 databases are secured

with
a workgroup file. No matter what I tried, I couldn't find a way to do it.

I
have to do this via code and these are the methods that I tried :

1) Tried to link tables onto a common database. This slapped onto my face
when I found there is no option to specify username and system database
while creating the linked tables via ADO. (Nor you can do from inside

Access
manually)

2) Tried to import the tables onto a common database. This also slapped

onto
my face when I found that this new common database does not only import

the
tables but their security datas where I get "You don't have Open/Read data
right." when I try to open the imported tables via ADO. The Interesting
thing is that when I open this database with Access 2003 it does very well
browse through the tables and records that I imported without the need of
any kind of special user right !?!?!?!

3) I tried to create a common database which is joined to a system

database
and this has also slapped onto my face.

What on earth does access does not provide me a way to do this? There is
also no documentation in anywhere on Access and WWW about this situation?

I got really mad after all my hardwork got stuck in a stupid problem like
this...

Please let me know if any solution comes into your mind and thanks again

for
your attention on my issue...

Özden

"Brendan Reynolds" brenreyn at indigo dot ie wrote in message
...
I looked into this but didn't get very far. ADOX help isn't functioning

on
my system, so I'm afraid I don't think there's much more I can do, but
this
is as far as I got, if you want to investigate it futher yourself ...

Public Sub CreateDatabaseADOX()

'Connection string below copied from a UDL file.
'Provider=Microsoft.Jet.OLEDB.4.0;
'Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\db1.mdb;
'Persist Security Info=False;
'Jet OLEDB:System database=C:\Documents and Settings\Brendan
Reynolds\My
Documents\Custom.mdw

Dim cat As ADOX.Catalog
Dim strConnect As String

Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\ADOXTest.mdb;" & _
"Persist Security Info=False;" & _
"Jet OLEDB:System database=C:\Documents and Settings\Brendan
Reynolds\My Documents\Custom.mdw"
cat.Create strConnect

End Sub

Code fails with following error message ...

-2147217887 (80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB

status
value, if available. No work was done.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible

for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted

without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Özden Irmak" ozdenirmakatisnetdotnetdottr wrote in message
...
Hi,

Does anybody have any sample code to create a database via ADOX catalog
object and join it to a workgroup file?

Thanks,

Özden








  #5  
Old September 3rd, 2004, 01:25 PM
Özden Irmak
external usenet poster
 
Posts: n/a
Default

Well, in this sample it's same but it may be possible as different. I would
like to hear if you have any solution when they are same?

Regards,

Özden

"Brendan Reynolds" brenreyn at indigo dot ie wrote in message
...
Are these two databases secured with the same workgroup file, or is each
database secured with a different workgroup file?

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Özden Irmak" ozdenirmakatisnetdotnetdottr wrote in message
...
Dear Brendan,

Thank you for your help...Let me describe you what I want to achieve...

I've to create some queries from 2 different databases (A query which

joins
different tables from both databases) and those 2 databases are secured

with
a workgroup file. No matter what I tried, I couldn't find a way to do it.

I
have to do this via code and these are the methods that I tried :

1) Tried to link tables onto a common database. This slapped onto my face
when I found there is no option to specify username and system database
while creating the linked tables via ADO. (Nor you can do from inside

Access
manually)

2) Tried to import the tables onto a common database. This also slapped

onto
my face when I found that this new common database does not only import

the
tables but their security datas where I get "You don't have Open/Read
data
right." when I try to open the imported tables via ADO. The Interesting
thing is that when I open this database with Access 2003 it does very
well
browse through the tables and records that I imported without the need of
any kind of special user right !?!?!?!

3) I tried to create a common database which is joined to a system

database
and this has also slapped onto my face.

What on earth does access does not provide me a way to do this? There is
also no documentation in anywhere on Access and WWW about this situation?

I got really mad after all my hardwork got stuck in a stupid problem like
this...

Please let me know if any solution comes into your mind and thanks again

for
your attention on my issue...

Özden

"Brendan Reynolds" brenreyn at indigo dot ie wrote in message
...
I looked into this but didn't get very far. ADOX help isn't functioning

on
my system, so I'm afraid I don't think there's much more I can do, but
this
is as far as I got, if you want to investigate it futher yourself ...

Public Sub CreateDatabaseADOX()

'Connection string below copied from a UDL file.
'Provider=Microsoft.Jet.OLEDB.4.0;
'Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\db1.mdb;
'Persist Security Info=False;
'Jet OLEDB:System database=C:\Documents and Settings\Brendan
Reynolds\My
Documents\Custom.mdw

Dim cat As ADOX.Catalog
Dim strConnect As String

Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\ADOXTest.mdb;" & _
"Persist Security Info=False;" & _
"Jet OLEDB:System database=C:\Documents and Settings\Brendan
Reynolds\My Documents\Custom.mdw"
cat.Create strConnect

End Sub

Code fails with following error message ...

-2147217887 (80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB

status
value, if available. No work was done.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible

for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with
a
GlobalSign digital certificate is a forgery and should be deleted

without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Özden Irmak" ozdenirmakatisnetdotnetdottr wrote in message
...
Hi,

Does anybody have any sample code to create a database via ADOX
catalog
object and join it to a workgroup file?

Thanks,

Özden










  #6  
Old September 3rd, 2004, 02:32 PM
Brendan Reynolds
external usenet poster
 
Posts: n/a
Default


The third database with links to the tables in the other two looks like the
way to go as long as all databases are using the same workgroup file. Do I
understand you correctly that for some reason creating this third database
manually during the design stages is not an option, for some reason you have
to do this dynamically at run-time?

BTW: None of this seems to have much to do with replication or table design,
I suggest we remove those newsgroups from the list and keep this to
microsoft.public.access and microsoft.public.access.security.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Özden Irmak" ozdenirmakatisnetdotnetdottr wrote in message
...
Well, in this sample it's same but it may be possible as different. I

would
like to hear if you have any solution when they are same?

Regards,

Özden

"Brendan Reynolds" brenreyn at indigo dot ie wrote in message
...
Are these two databases secured with the same workgroup file, or is each
database secured with a different workgroup file?

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible

for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted

without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Özden Irmak" ozdenirmakatisnetdotnetdottr wrote in message
...
Dear Brendan,

Thank you for your help...Let me describe you what I want to achieve...

I've to create some queries from 2 different databases (A query which

joins
different tables from both databases) and those 2 databases are secured

with
a workgroup file. No matter what I tried, I couldn't find a way to do

it.
I
have to do this via code and these are the methods that I tried :

1) Tried to link tables onto a common database. This slapped onto my

face
when I found there is no option to specify username and system database
while creating the linked tables via ADO. (Nor you can do from inside

Access
manually)

2) Tried to import the tables onto a common database. This also slapped

onto
my face when I found that this new common database does not only import

the
tables but their security datas where I get "You don't have Open/Read
data
right." when I try to open the imported tables via ADO. The Interesting
thing is that when I open this database with Access 2003 it does very
well
browse through the tables and records that I imported without the need

of
any kind of special user right !?!?!?!

3) I tried to create a common database which is joined to a system

database
and this has also slapped onto my face.

What on earth does access does not provide me a way to do this? There

is
also no documentation in anywhere on Access and WWW about this

situation?

I got really mad after all my hardwork got stuck in a stupid problem

like
this...

Please let me know if any solution comes into your mind and thanks

again
for
your attention on my issue...

Özden

"Brendan Reynolds" brenreyn at indigo dot ie wrote in message
...
I looked into this but didn't get very far. ADOX help isn't

functioning
on
my system, so I'm afraid I don't think there's much more I can do,

but
this
is as far as I got, if you want to investigate it futher yourself ...

Public Sub CreateDatabaseADOX()

'Connection string below copied from a UDL file.
'Provider=Microsoft.Jet.OLEDB.4.0;
'Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\db1.mdb;
'Persist Security Info=False;
'Jet OLEDB:System database=C:\Documents and Settings\Brendan
Reynolds\My
Documents\Custom.mdw

Dim cat As ADOX.Catalog
Dim strConnect As String

Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\Brendan Reynolds\My
Documents\ADOXTest.mdb;" & _
"Persist Security Info=False;" & _
"Jet OLEDB:System database=C:\Documents and Settings\Brendan
Reynolds\My Documents\Custom.mdw"
cat.Create strConnect

End Sub

Code fails with following error message ...

-2147217887 (80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB

status
value, if available. No work was done.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it

impossible
for
me to use a real e-mail address in public newsgroups. E-mail replies

to
this post will be deleted without being read. Any e-mail claiming to

be
from brenreyn at indigo dot ie that is not digitally signed by me

with
a
GlobalSign digital certificate is a forgery and should be deleted

without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll

find
a useable e-mail address at the URL above.


"Özden Irmak" ozdenirmakatisnetdotnetdottr wrote in message
...
Hi,

Does anybody have any sample code to create a database via ADOX
catalog
object and join it to a workgroup file?

Thanks,

Özden












 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Q1: How to create a boolean table field in code? Jeff Conrad General Discussion 5 August 11th, 2004 08:22 AM
Database Window Gone DaveB General Discussion 2 July 29th, 2004 12:24 AM
Import same area code to a large database of phone numbers Xavier Worksheet Functions 1 April 22nd, 2004 09:26 PM


All times are GMT +1. The time now is 07:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.