Do Shell Script and MS SQL
Do Shell Script and MS SQL
- Subject: Do Shell Script and MS SQL
- From: Steve Suranie <email@hidden>
- Date: Tue, 31 May 2005 14:41:05 -0400
Hi all
I am trying to retrieve data from an MS SQL db and I have it working fine
using FreeTDS in the terminal but I can't seem to figure out how to
translate that into an AppleScript.
I can type the following in the terminal and get a returned result from the
database [Anything in all caps I changed to protect the innocent. ;) ]:
MYNAME:~ steve$ bsqldb -U USERNAME -P PASSWORD -S VOLUME.merion.com:1433 -D
Merion
Msg 5701, Level 0, State 2
Server ' VOLUME',
Changed database context to 'Merion'.
Msg 5701, Level 0, State 1
Server ' VOLUME', Line 1
Changed database context to 'Merion'.
EIM_Select_Employees_Matching_Image 'Steve', 'Suranie'
go
MerionEmployeeID FirstName LastName
Username Email
Department
Office Phone Separated
---------------- ------------------------------
------------------------------ --------------------
--------------------------------------------------
---------------------------------------------------------------------------
-------------------------------------------------- ------ -----------
974 Steve
Suranie Ssuranie
email@hidden
Illustration/Photography/Web Design King
of Prussia 1449 0
1 rows affected
but if I try this in AppleScript:
set theResults to do shell script "MYNAME:~ steve$ bsqldb -U USERNAME -P
PASSWORD -S VOLUME.merion.com:1433 -D Merion"
I get an error message: sh: line 1: ssuranie:~: command not found.
Any help would be appreciated.
Thanks
Steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden