![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi - I have a 32 bit SQL Server 2000 installation that is current on service packs that is installed on a 64 bit version of Windows 2003 (this actually works ok). It's not mine, but I have to deal with it. There are a few DTS packages I need to transpose into T-SQL that read from dbase files. I know DTS has drivers to read dbase files (because one can "connect" to them), but in looking in the DSN area on the machine, I see that it indicates no drivers are installed except for SQL Server. I need to write T-SQL, using something like openrowset or openquery, that opens and reads from these dbase files. 1) Can I utilize the dbase drivers built-in to DTS, without having to install some old version of MDAC ? How ? 2) If I have to use MDAC, apparently I have to go back to the 2.5 version because the later versions don't support file formats like dbase ? Is this correct ? 3) Can someone please please point me to specific correct connection string examples for the above cases ? The connection strings seem to be more of a pain than the drivers, half of the time .. Thank-you very much for any assistance. Steve |
#3
| |||
| |||
|
|
Hi Steve, Something like this should work, with SourceDB pointing to the folder with the dBase tables: select * from OPENROWSET('MSDASQL', 'Driver={Microsoft dBase Driver};SourceDB=c:\MyApp\;SourceType=dbf', 'select * from MyTable') Or you could create a linked server with Provider = Microsoft.Jet.OLEDB.4.0, a datasource that points to the folder with the dBase tables, and ProviderString = 'dBase IV'. Charles Kangai, MCT, MCDBA Author of Learning Tree's 4-day course: "SQL Server 2005 Integration Services" http://www.learningtree.com/courses/134.htm Author of Learning Tree's 4-day course: "SQL Server Reporting Services" http://www.learningtree.com/courses/523.htm email alias: charles email domain: kangai.demon.co.uk "Steve Mull" wrote: Hi - I have a 32 bit SQL Server 2000 installation that is current on service packs that is installed on a 64 bit version of Windows 2003 (this actually works ok). It's not mine, but I have to deal with it. There are a few DTS packages I need to transpose into T-SQL that read from dbase files. I know DTS has drivers to read dbase files (because one can "connect" to them), but in looking in the DSN area on the machine, I see that it indicates no drivers are installed except for SQL Server. I need to write T-SQL, using something like openrowset or openquery, that opens and reads from these dbase files. 1) Can I utilize the dbase drivers built-in to DTS, without having to install some old version of MDAC ? How ? 2) If I have to use MDAC, apparently I have to go back to the 2.5 version because the later versions don't support file formats like dbase ? Is this correct ? 3) Can someone please please point me to specific correct connection string examples for the above cases ? The connection strings seem to be more of a pain than the drivers, half of the time .. Thank-you very much for any assistance. Steve |
![]() |
| Thread Tools | |
| Display Modes | |
| |