Cygwin and Microsoft SQL

J

John Call

Need to use Expect.pm on Win32. Read this is possible with Cygwin.
However, I need to interface with a Microsoft SQL database. Does
Cygwin create a virtual computer that doesn't know about windows or
should the perl in Cygwin be able to interface with the Microsoft SQL
using Win32::ODBC?

Thanks,

John
 
J

James Willmore

On 25 Oct 2003 07:05:50 -0700
Need to use Expect.pm on Win32. Read this is possible with Cygwin.
However, I need to interface with a Microsoft SQL database. Does
Cygwin create a virtual computer that doesn't know about windows or
should the perl in Cygwin be able to interface with the Microsoft
SQL using Win32::ODBC?

You should thinking about using the Win32::ODBC module -or- the DBI
module using the appropriate DBD module.

I'm not sure how Expect is suppose to factor into this - because both
Win32::ODBC and DBI (in this case) use the listening port on the
database server to connect. Unless you're thinking about using Expect
to emulate a user - in which case I'm thinking you may need to
re-think you're thinking :)

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
Talking much about oneself can also be a means to conceal
oneself. -- Friedrich Nietzsche
 
J

John Call

James Willmore said:
On 25 Oct 2003 07:05:50 -0700


You should thinking about using the Win32::ODBC module -or- the DBI
module using the appropriate DBD module.

I'm not sure how Expect is suppose to factor into this - because both
Win32::ODBC and DBI (in this case) use the listening port on the
database server to connect. Unless you're thinking about using Expect
to emulate a user - in which case I'm thinking you may need to
re-think you're thinking :)


Sorry, I was in such a hurry I didn't make myself very clear. I need
Expect.pm so I can connect to some other boxes with ssh and then su
and run a program but since they want this running on a Win32 box I
will have to use Cygwin for Expect.pm to work. Wasn't sure if the perl
in Cygwin could see Microsoft SQL as being on the same box.

I will be using DBI or Win32::ODBC for the database connection.

Thanks,

John
 
S

sk

Unless you need the other Unixy services of Cygwin, why not use
ActiveState perl? It supports Expect these days, and with PPM you can
get precompiled modules for stuff like ODBC and ADO, sparing you some of
the occasional CPAN headaches on Win32. Plus, if Perl's all you'd be
doing with Cygwin install, you'll get quicker startup and less overhead.
 
J

John Call

I read the Expect.pm doc yesterday and it said I would need Cygwin to
run Expect because of the tty issues. If you know of a way I can run
Expect.pm on Win32 under ActiveState I would love to know.
 
S

sk

John said:
I read the Expect.pm doc yesterday and it said I would need Cygwin to
run Expect because of the tty issues. If you know of a way I can run
Expect.pm on Win32 under ActiveState I would love to know.

Gah. I saw something on the ActiveState mailing lists that sounded like
it was working circa 2001 or so, but it ain't. Cygwin it is. Amazing
after all these years.

Sorry. Carry on.
 
J

James Willmore

Gah. I saw something on the ActiveState mailing lists that sounded
like it was working circa 2001 or so, but it ain't. Cygwin it is.
Amazing after all these years.

Not really. The language expect has very few ports to Windoze. Best
to compile your own and hope it works, AFAIK and IMHO.

Sad really. It could be of so much use (as well as the Expect module)
on a Windoze box - like rebooting other boxes :)

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
Oh, wow! Look at the moon!
 
R

Richard Williams

John Call said:
Sorry, I was in such a hurry I didn't make myself very clear. I need
Expect.pm so I can connect to some other boxes with ssh and then su
and run a program but since they want this running on a Win32 box I
will have to use Cygwin for Expect.pm to work. Wasn't sure if the perl
in Cygwin could see Microsoft SQL as being on the same box.

I don't know about the specifics of using MS-SQL with Expect.pm under
Cygwin, but in general Cygwin applications have no trouble communicating
with standard Win32 programs. Cygwin is built on top of the underlying
Windows system, rather than running as (e.g.) a separate virtual machine.
You can, for example, run Cygwin applications from the standard Windows
shell or GUI, provided that the Cygwin .dll is in your Windows PATH.
Conversely, I often run Activeperl from the Cygwin bash shell (I don't
currently have Cygwin's perl installed).

Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,364
Latest member
Stevanida

Latest Threads

Top