in reply to Perl connect to Microsoft SQL 2000

DBI and DBD are really one in the same. They're also the de facto standard for Perl database interaction.

You probably want to look at DBI and DBD::ADO, as it works really well for Win32 connections. As a bonus, you won't have to install any Sybase open client stuff, either. You'll need some Win32 like Win32::OLE if you don't have them already.

If you're wanting to branch out under some *nix OS, I'd take a look at DBD::Sybase using FreeTDS. Keep in mind that FreeDTS and DBD::Sybase have some problems with placeholder values, so you'll probably have to change some of your statement parsing code. I don't really like the way that the Sybase client libraries work, but I've heard they work equally well.

As for special software, you'll need Perl, the modules that DBD::ADO requires (they're listed in the POD) and the correct ADO drivers for your platform (available from Microsoft). It's about the same as deploying any other Win32 database application, actually.

The only part that I don't really understand is the "adjustments needed" statement. Adjustments from what? Are you a DBA who's only ever used the SQL2000 admin interface? A seasoned Java programmer? An old hat at Visual Basic 5.0? An Access form tweaker? Each of these situations will probably impose different requirements, both in language and data access methodologies. If you care to elaborate a bit more for what you're looking for, I'll post a follow-up.

(EDIT: added the third paragraph because I didn't think I was sufficiently long-winded.)

Replies are listed 'Best First'.
Re^2: Perl connect to Microsoft SQL 2000
by mpeppler (Vicar) on Jun 30, 2004 at 10:38 UTC
    I don't really like the way that the Sybase client libraries work, but I've heard they work equally well.
    The Sybase libs will NOT work against MS-SQL 2k, because MS changed the login sequence so the fallback to the TDS 4.2 protocol fails (TDS 4.2 is supposed to be the lowest common denominator in the TDS protocol stack, and should be supported by both Sybase and MS.)

    BTW - what don't you like with the Sybase libs?

    Update: dragonchild /msg'd me to say that this node was a bit confusing. What I mean is that the Sybase Client Libraries can't be used to connect to MS-SQL 2k. However, FreeTDS works fine (with some limitations), so DBD::Sybase can certainly be used when built with the FreeTDS libraries.

    Michael