• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Do Shell Script and MS SQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Do Shell Script and MS SQL
      • From: Dave Balderstone <email@hidden>
References: 
 >[ann] TextCommands 0.5.0 (From: has <email@hidden>)

  • Prev by Date: Scripting Mail.app suggestions requested
  • Next by Date: Re: Do Shell Script and MS SQL
  • Previous by thread: [ann] TextCommands 0.5.0
  • Next by thread: Re: Do Shell Script and MS SQL
  • Index(es):
    • Date
    • Thread