Using DAO.RegisterDatabase for AS400

M

Matthew Wells

Hello,

I'm trying to build an attribute string to use in the RegisterDatabase
method to create a DSN for AS400. Does anyone know?

Thanks.

Matthew Wells
(e-mail address removed)
 
G

Guest

Use the odbc manager to create a file DSN: then open the
file dsn in Notepad and read the attributes. I see that the
attributes are separated by VBcr, so if you have a sample
ODBC connect string, replace the ";" with chr(13)

Since RegisterDatabase does not create a File DSN, you
won't be able to use the Linked Table Manager in Access--
but if you plan to use Access, consider using DSN'less
connections instead of DSN's.

(david)
 
M

Matthew Wells

Good idea, but it didn't work. I keep getting "ODBC call failed" when I
execute .RegisterDatabase. BTW, you can linke tables in Access using a file
dsn - I did it. Also, you can not use a dsn-less connection with dao
tabledefs and querydefs. That's why I want to use a DSN. We are about to
add 25 new users who need this database that connects to six different data
sources and I don't want to go to each machine and create all the DSNs. the
..RegiserDatabase method is working fine for my Oracle connections, but not
the AS400.

Any other ideas?

Thanks.

Matthew Wells
(e-mail address removed)
 
D

David C. Holley

I would suggest snooping around the AS/400 (excuse me iSERIES)
community. I'm thinking that there's a few more on that side that have
setup similar connections for users than on this side.
 
G

Guest

Good idea, but it didn't work. I keep getting "ODBC call failed"
when I execute .RegisterDatabase.

This would have to be the least known DAO method of all...
so you might not find much help here :~(.
BTW, you can link tables in Access using a file dsn - I did it

Yes, you can link using a file or system or user dsn. I think
that the "Linked Table" add in has trouble with system dsn's.
Also, you can not use a dsn-less connection with dao
tabledefs and querydefs.

I do. Have you tried it? You can modify the standard tabledef
examples to include querydefs and passthrough queries.

Here is one of the standard examples:
http://www.mvps.org/access/tables/tbl0009.htm
Note that the odbc linking is commented out. You need
to provide a value at this line:
' .Connect = pcCONNECT

Here is an article about creating connect strings:
http://msdn.microsoft.com/archive/d...nnectionStringParametersinMicrosoftAccess.asp

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top