ADO connection

G

geebee

I have some sample code to try to connect to a MS SQL server. the code is
like:

Dim cn As ADODB.COnnection
Set cn = New ADODB.COnnection
....

I need to know what terminology to use when I am speaking with our LAN
group. Do I need to ask for the name of the AS400 datasource, the location,
etc?

Does all this make sense?

Thanks in advance,
geebee
 
D

Dave Patrick

You'll need the connection string and or driver.

http://www.connectionstrings.com/

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
|I have some sample code to try to connect to a MS SQL server. the code is
| like:
|
| Dim cn As ADODB.COnnection
| Set cn = New ADODB.COnnection
| ...
|
| I need to know what terminology to use when I am speaking with our LAN
| group. Do I need to ask for the name of the AS400 datasource, the
location,
| etc?
|
| Does all this make sense?
|
| Thanks in advance,
| geebee
|
 
G

geebee

I found the following:

ODBC Driver for AS400
strConnect = _T("Driver={Client Access ODBC Driver (32-bit)};System=myAS400;"
"Uid=myUsername;Pwd=myPassword;");

OLE DB Provider for AS400
strConnect = _T("Provider=IBMDA400;Data source=myAS400;User Id=myUsername;"
"Password=myPassword;");

So I guess I could use either one. Now I just have to figure out how this
fits into context of a form design. For example, I want to use one of the
preceding possibilities as I design a form. And I want the form to display
some fields, something simple at first. I am having trouble finding out how
this fits into the context of things. Could someone maybe send me an example
form?

Thanks in advance,
geebee
 
R

Ron Weiner

I would recommend that you link your Access front end into the AS 400
database, and build bound forms the same way that you would build any Access
form. Done this way you do not even need a connect string, all of the
configuration will be handled by the File or Machine DSN.

Refer to my earlier reply to your post "Getting data from AS400" for more
info. Pay particular attention to getting the latest drivers, and my
admonishment about changing data on the AS400.
 
G

geebee

Ron,

You recommended:

"IBM has an ODBC driver for the AS 400 that when installed on a workstation
makes it possible for Access to directly Link / Import tables. "

Does the drivers need to be installed on every machine accessing my MS
Access databasae?
 
R

Ron Weiner

YES! If they need to look at the data from the AS400

What we have done is to use an batch overnight update process that Imports
AS400 Data into Access Tables (Actually Sql 2000) to a database on the
server that all users are attached to. This gives everyone access to last
nights data, without having the IBM ODBC drivers installed on their
workstation. It also made the AS400 caretakers happy because there is NO
possible way that a malicious user could change anything on their precious
little server. If you can live with last nights data this could be a good
solution for you.
 
G

geebee

we have an odbc connection via access to as400 on one of our machines.
however, something wierd is happening with a couple of the linked tables.
when you look at the data, ALL of it appears as Chinese characters. However,
if you retrieve the data programatically via code, it appears fine. What
causes this? Would a patch solve this?

thanks in advance,
geebee
 
R

Ron Weiner

My Experiences with the IBM ODBC drivers has been .... er. well lets say we
are finally able to use them without error. I would implore you to have
your AS400 minders do a little research and determine if the drivers you are
using are the most up-to-date ones. At various times we had any number of
un-explainable mismatched data abnormalities until we got the AS400 minders
off their duffs, and square away the problems. All I can tell you is that
once it was fixed it has stayed fixed for almost 2 years.
 

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