Access ODBC connection

Part of the funtionality in the app I'm building is connecting to a
remote Access database and retrieving monthly billing data.  In
configuring the ODBC connection, I had to use the 'User DSN' tab rather
than the 'System DSN' tab.  This limits who can login to my app and
successfully get the data from Access.  Only the user the ODBC
connection is configured for is able to do it.  PowerBuilder just didn't
recognize the connection if it wasn't a User DSN.  Is this a limitation
I just have to live with?  Or is there a workaround?  Thanks for any
help in advance,

Bruce Kimura
b_kimura@yahoo.com

0
Bruce
4/3/1999 12:40:21 AM
sybase.powerbuilder.connection 3893 articles. 0 followers. Follow

1 Replies
534 Views

Similar Articles

[PageSpeed] 53

This may be more than you want to see, but we successfully connect to Access
databases using the ODBC System DSN tab.  My understanding of this evolved
from first using just the User DSN definition, to using both, to finally
just using the System DSN tab.  As I recall, there was basically no
difference whatsoever from the PowerBuilder end of things.

Following is the InstallShield code for creating the registry entries for
our database.  The first three are for our application, the remainder is the
equivalent of what the ODBC Administrator puts in place.  Entries under
HKEY_LOCAL_MACHINE are in the System DSN Tab.  User DSN puts them under
HKEY_CURRENT_USER.  After that, I have the PowerBuilder code where we
actually connect.  (Note: we swap this app back and forth between Access and
MS SQL Server - I hope that I haven' t left anything in here from the SQL
Server connection that may confuse.)  I hope this helps!

Cliff

InstallShield code:
    RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);

    RegDBSetKeyValueEx("SOFTWARE\\PSC\\WEGSARS Ver 2\\Water_Database",
"Database", REGDB_STRING, "Water_ARS", -1);
    RegDBSetKeyValueEx("SOFTWARE\\PSC\\WEGSARS Ver 2\\Water_Database",
"DBMS", REGDB_STRING, "ODBC", -1);
    RegDBSetKeyValueEx("SOFTWARE\\PSC\\WEGSARS Ver 2\\Water_Database",
"DBParm", REGDB_STRING, "ConnectString='DSN=Water_ARS;'", -1);

    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS", "DBQ",
REGDB_STRING, svDATADir^"WaterARS.mdb", -1);
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS", "Driver",
REGDB_STRING, WINSYSDIR^"odbcjt32.dll", -1);
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS", "DriverID",
REGDB_NUMBER, "25", -1);
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS", "FIL",
REGDB_STRING, "MS Access;", -1);
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS", "UID",
REGDB_STRING, "admin", -1);
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS",
"SafeTransactions", REGDB_NUMBER, "0", -1);
    RegDBCreateKeyEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS\\Engines", "");
    RegDBCreateKeyEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS\\Engines\\Jet",
"");
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS\\Engines\\Jet",
"ImplicitCommitSync", REGDB_STRING, "Yes", -1);
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS\\Engines\\Jet",
"MaxBufferSize", REGDB_NUMBER, "512", -1);
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS\\Engines\\Jet",
"PageTimeout", REGDB_NUMBER, "5", -1);
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS\\Engines\\Jet",
"Threads", REGDB_NUMBER, "3", -1);
    RegDBSetKeyValueEx("SOFTWARE\\ODBC\\odbc.ini\\Water_ARS\\Engines\\Jet",
"UserCommitSync", REGDB_STRING, "Yes", -1);

******
PowerBuilder code:

string ls_regsection

IF IsValid ( gnv_app ) THEN
 ls_regsection = gnv_app.of_getregkeysection () + "Water_Database"
END IF

 SQLCA = CREATE transaction
 SQLCA.AutoCommit = FALSE

RegistryGet(ls_regsection,"DBMS", SQLCA.DBMS)

IF SQLCA.DBMS = 'ODBC' THEN
 RegistryGet(ls_regsection,"DBParm",SQLCA.DbParm)
 SQLCA.ServerName = "ACCESS"
ELSE
 RegistryGet(ls_regsection,"Database",SQLCA.Database)
 RegistryGet(ls_regsection,"ServerName",SQLCA.ServerName)
 SQLCA.LogID = gs_user
END IF

CONNECT USING SQLCA ;



0
Cliff
4/5/1999 6:41:10 PM
Reply:

Similar Artilces:

Connection to Access query works in developer envir, but not on the web <OleDbException (0x80004005): ODBC--connection to 'ODBC' failed>
I am VERY frustrated with a seemingly simple problem.  I am creating a gridview in VWD (express or studio), then connecting to a query within an Access Database.  The results of the query display without problem in the developer envirornment, but simply will not display when copied out to the website.  The ODBC connection that the Access Database is using fails even on the local machine.  I have spent fruitless hours looking at all security settings in IIS and the effected folders.  I could re-write all the access queries in SQL and connect to the server direct...

Connect to Access with Powerbuilder via ODBC
I'm unable to connect to my Access 97 database using Powerbuilder 6.5 build 444. The error I'm getting is: SQLSTATE: S1003 [Microsoft][ODBC Driver Manger]Program type out of range. Any help would be appreciated. Thank you. Vincent vuv@gte.net ...

not connected when I am connected
What do I need to change on my 'puter when the icon in the toolbar shows and tells me I am connected and the error message tells me I am not and I can not go to web pages, get or send emails. I have to close down and restart to get connected again. This only happens if I am on line and leave the 'puter for an hour or so. As long as I am using it I don't have a problem. This just started about a month ago. I am on very slow dialup, DSL and Cable not in my area, thanks you SBC/ATT tks Elaine wrote: > What do I need to change on my 'puter when the icon in ...

Connecting to Access from Powerbuilder via ODBC
I am unable to connect to my Access 97 database from Powerbuilder 6.5 build 444. The error I'm getting is: SQLSTATE = S1003 [Microsoft][ODBC Driver Manger] Program type out of range Any help would be appreciated. Thank you. Vincent Vu vuv@gte.net I have the same problem to connect MS Access 2000 by using PowerBuilder 6.5. Do you have any solution to help me? if you have any solution please send e-mail to me. Thanks, E-mail: thomas_chow@wkk.com.hk ...

Can't connect to Access Data Base with ODBC connection
I am using Visual Web Developer and trying to connect to an Access data base in the code behind page  Default.aspx.vb.    I can't connect to my data base with the following code: Dim connectionstring As String connectionstring = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\asp\test02\App_Data\company.mdb;User Id=admin;Password=;" Dim myConn As OdbcConnection = New OdbcConnection(connectionstring) myConn.Open()   I alwasy get :   "Data Source not found and no default driver found:.   Does anyone know what I am doing wrong ?? Check ou...

Connection from PowerBuilder connects to Internet
We have a client who has experienced a problem I've seen posted on this forum but can't find now. When they connect with our application to SQLAnywhere, they're getting their connect to AOL dialog. They can cancel out and everything works. I remember that it's a problem with their version of the winsock.dll, but I don't remember the recommended solution. Thanks for you help, James Clanton >When they connect with our application to SQLAnywhere, they're getting their >connect to AOL dialog. They can cancel out and everything works. I >rem...

Client Connections and PowerBuilder connections
What do I need to do to my NT box to be able to run a browser from a client machine to run the demo database/tutorial? I am able to run the demo from the NT server itself, but would like to test client connectivity. My client has browser capability. Furthermore, I am anticipating on using Jaguar as a middle tier for accepting communications from PowerBuilder. Jaguar would then take the SQL and pass the information onto a SYBASE SQL Server. I am not even concerned with any of the business logic that may be involved but am more interested in getting Jaguar to be a middle tier while...

Powerbuilder connection to MS Access using ODBC on XP
My Powerbuilder app currently connects correctly to an MS Access db to import data using ODBC on an NT platform. We are upgrading to XP and the connection fails. I get this error message : "DBMS ODBC is not supported in your current installation" I think that it may need a .dll for XP in order to connect. Any help would be great. Thanks ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp It sounds like your ODBC drivers aren't registered with XP. Try doing the PB runtime installation again and make sure you setup th...

ODBC Connections with PowerBuilder
This is actually a follow up to my previous "PB5.0 Connection to Watcom DB." We upgraded the PB libraries to 5.0.04 and were able to solve the "The allocation of the connection handle failed" problem. However, the "The command extension block could not be allocated" still happens when: 1) Start a PB application with an ODBC connection and leave it running. 2) Start and end a second PB application with an ODBC connection. 3) Repeat step 2 24 times. 4) When the second app is started the 25th time we get the "The command extension block could not ...

ODBC Connection to Access
Im connecting a Sybase SQL Anywhere database in Access97 using ODBC. When I try to update the recordset I get the follwong error: "[Sybase][ODBC Driver]Unable to connect to database server: authentication violation (-98) " I have changed the permissions on the database and removed "Read Only" Any Ideas? Authentication violations usually indicate that you are using a third party product and they have restricted the use of the db engine to their product. Is this true? -- Jim Egan [TeamPS] Dynamic Data Solutions - http://www.dyn-data.com Houston, TX...

The connection is already open and the connection state is connecting.
Hello, I am getting this error time to time randomly. My web application is built on asp.net 3.5 which uses ODBC 5.1 driver to connect to mysql database. I have a separate database class which handles the connection, execute, fetching and all. The application runs fine for sometime then suddenly the users start getting this error after which the application fails to insert select from database. I have posted in this forum couple of times now and no one is really contributing or helping me. Please..Any help will be highly appreciated.. Many thanks, Viv The database abstract loo...

SFtp connect
The following Ftp connect to a sftp site has the right port/usrname/password [verified thru filezilla], but when I try to connect via TIDFTP -- I get "Connection Closed Gracefully" upon ftp->Connect();; The ftp properties are below the code. I have no other Indy objects on the form. It ocurred to me that I may need something for sftp. ftp->Connect(); if (ftp->Connected()) { ::Sleep(1); } object ftp: TIdFTP AutoLogin = True Host = 'ftp.dailyaccess.com' Password ='XXXXX' Port = 21 Username = 'charles.leggette' ProxySet...

Connecting to an access databse useing an OLEBD connection
  <% @ Import namespace=System.data.Oledb %>  string strDsn = "Trusted_Connection=Yes;DSN=beautyaids"; OleDbConnection conn = new OleDbConnection(strDsn); conn.Open();   I have written the following code, above.  This is in an ASPX page.  The code runs until it gets to the conn.Open.  All the books and documents state to create the string as done above.  When the compiler gets to the conn.Open spits out the following error message " An error occurred during the compilation of a resource required to service this request. Please review the fol...

Access a TCP connection from an HTTP server connection?
I have two Component::Server::TCP servers running (A and B). Server B needs to write to a connection on server A. A's connections have a unique md5 id assigned to their heap. B should located a connection on A based on it's unique id, then write some data to it. I'm able to locate the server as follows: $server = $poe_kernel->alias_resolve('tcp_server'); I'd then planned to do something equivalent to the following: foreach my $conn ($server->getConnections()) { if ($conn->{heap}->{'uniqueID'} eq $requestedID) { $c...

Web resources about - Access ODBC connection - sybase.powerbuilder.connection

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Man Charged With Aggravated Arson In Connection To Columbus Warehouse Fire
Police have charged 30-year-old Robin Toms with aggravated arson.

Adam Savage from 'MythBusters' has an incredible connection to the 'Star Wars' franchise
Adam Savage, co-host of the popular " MythBusters " television show, soured on the plot of "Interstellar." But when it comes to the newest films ...

Heavyset woman with facial hair arrested in connection to downto - CBS News 8 - San Diego, CA News Station ...
Police were on the lookout Thursday for a heavyset woman with facial hair who stabbed a man in the East Village.

Arrest made in connection with California mosque fire
CNN Arrest made in connection with California mosque fire CNN (CNN) A California man was arrested Saturday in connection with a fire at a ...

UK Police Make Arrest in Connection With VTech Hacking
British law enforcement officials arrest a 21-year-old man in connection with attack on toy maker VTech that exposed 6 million parents and children ...

"News Feed" For Slower Connections: Facebook's Strategy To Build A Stronger User Base
The changes in News Feed will more efficiently show relevant stories in a slow connection and let users compose comments when they are offline. ...

Resources last updated: 12/30/2015 2:34:12 AM