Differences between revisions 2 and 3
Revision 2 as of 2020-03-12 16:00:21
Size: 797
Comment:
Revision 3 as of 2020-03-12 16:04:15
Size: 833
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
A (potentially deprecated) System32 batch script. A (deprecated and '''pending removal''') Windows Data Access Components batch script.

ODBC

You poor, poor fool.


Create Connection

ODBCConf.exe

A (deprecated and pending removal) Windows Data Access Components batch script.

odbcconf.exe /a { configdsn "Microsoft Access Driver (*.mdb, *.accdb)" "DSN=DATABASE_NAME|DBQ=ABSOLUTE\PATH\TO\DATABASE.accdb" }

Add-OdbcDsn

A Powershell cmdlet.

Add-OdbcDsn -Name "DATABASE_NAME" -DriverName "Microsoft Access Driver (*.mdb, *.accdb)" -DsnType "User" -SetPropertyValue 'DBQ=ABSOLUTE\PATH\TO\DATABASE.accdb'


Connecting Applications to ODBC

SPSS

get data
 /type=odbc
 /connect='DSN=DATABASE_NAME;DBQ=ABSOLUTE\PATH\TO\DATABASE.accdb;'
 /sql='SELECT * FROM TABLE_NAME'
 /assumedstrwidth=255.


CategoryRicottone

ODBC (last edited 2021-11-20 22:16:07 by DominicRicottone)