Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 20th, 2006, 01:50 PM
Authorized User
 
Join Date: Mar 2006
Location: Calexico, CA, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default can to link a ms access table to sql server?

hi, i didnt know where exactly to post this question:
I can link Sql server tables to my access database, but i cant link my access tables to from the sql server database, may be because the ms access database its stored on a unix samba share?

This is the scneario, i have a unix samba share in my network, there are all the office stuff, including a share to a Ms access database wich its accessed from many windows clients.
Now i need to access that ms access database from http, so i installed apache+php in a windows server in the same workgroup, i did succesfully test when the ms access database was on the local windows server, but once i tried with the database in the actual server it didnt worked, i found few scripts in google about odbc, ole, and dsn-less connections, all of them worked when database resides in the local machine, but don work when database is in the actual unix samba share.

This is the script used with local machine test:

//$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("\\\\POS-SERVER\C$\om\xxafta.mdb") ." ;DefaultDir=". realpath("\\\\POS-SERVER\C$\om");

this is the script used for samba share, it didnt work:
//$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("\\\\nas1\workware\OrderManager\xxafta.md b") ." ;DefaultDir=". realpath("\\\\nas1\workware\OrderManager");

What can I do? any adcvices will be apreciated/.


  #2 (permalink)  
Old May 21st, 2006, 11:50 AM
Friend of Wrox
 
Join Date: Dec 2005
Location: , AZ, .
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

What account is the SQL Server service running under? Does it have the permissions to connect to the SAMBA share?

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com
  #3 (permalink)  
Old May 22nd, 2006, 11:32 AM
Authorized User
 
Join Date: Mar 2006
Location: Calexico, CA, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

im not sure what you askin, but sql server runs the database with an account called 'sa' and the machine access the samba share with an autorized unix account called 'pos-server'
  #4 (permalink)  
Old May 22nd, 2006, 05:47 PM
Friend of Wrox
 
Join Date: Dec 2005
Location: , AZ, .
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

Open Computer manager
Go to Services
Double click on the SQL Server Service
click on the Logon Tab. Post back to the forum what it says.

If it says local system, then switch to a domain user.

If it lists a user try logging on as that user and then connecting to the share on SAMBA. If you are successful then it should work. If not then you need to examine how you have SAMBA configured.

I suggest the following articles to illustrate how SAMBA can trust NT or AD to authenticate the users.

http://www.samba.org/samba/docs/man/...ainTrusts.html
http://info.ccone.at/INFO/Samba/Samb...html#id2535582

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com
  #5 (permalink)  
Old May 22nd, 2006, 06:01 PM
Authorized User
 
Join Date: Mar 2006
Location: Calexico, CA, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The MSSQLSERVER service is running with the Local System Account and the SQLSERVERAGENT is running with a user account i created i when i setup replication.

  #6 (permalink)  
Old May 22nd, 2006, 06:24 PM
Authorized User
 
Join Date: Mar 2006
Location: Calexico, CA, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The thing was solved. I debbuged using the realpath php function...

I changed the user that apache uses to logon, to a samba authorized user acconunt, not the system account, and with this string:

$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("\\\\nas1\\workware\\OrderManager\\xxafta .mdb") ." ;DefaultDir=". realpath("\\\\nas1\\workware\\OrderManager");

thanks to all!!!

  #7 (permalink)  
Old May 23rd, 2006, 11:45 AM
Authorized User
 
Join Date: Mar 2006
Location: Calexico, CA, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now, i think i can do any conventional type of database connection... what should i use for faster response and performance?
ODBC? OLE? DSN-LESS?... or may be linking the access databse to the SQL Server i have installed on the web server?, what I really wish its to have a faster querying of the MS access database without compromising the performance of Our SQL Server database application.

There are 2 machines involved:

Mahcine1:
Dual Core Unix Server
Samba Server
MS Access Database


Machine1:
Dual Core Windows Server
Sql Server
Apache and PHP Server

Thanks in advance.

ALDO




Similar Threads
Thread Thread Starter Forum Replies Last Post
MS ACCESS 2003 FRONTEND AND MS SQL SERVER 2005 DB mohankumar0709 SQL Server 2005 3 March 23rd, 2007 12:48 AM
MS Access to SQL server connection imaley Access VBA 3 February 16th, 2007 01:59 PM
Best way to link Access to SQL Server echovue Access VBA 0 May 31st, 2006 04:28 PM
Read SQL Server 2000 files into MS-Access slewis4 SQL Server 2000 8 March 1st, 2006 04:21 PM
how to convert ms access db to sql server method SQL Server 2000 1 March 11th, 2005 11:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.