use DBI;
my $dbh = DBI->connect("dbi:Sybase:", $user, $passwd);
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] [d/l] |
bhaskar_219:
I'd suggest either:
- Install DBI, install DBD::ODBC, read the DBI docs, write code, or
- Look through the Tutorials#Database section for interesting articles, and write code.
Then, if code fails, write a good question for us monks.
...roboticus
| [reply] |
OP downvoted... for blatant lack of effort (failure to search, read docs). | [reply] |
I tried all the procedures mentioned in open search page.
but
1. I tried to install sybase in sytem(600MB file) and then installing the module DBD::Sybase.. Its long time and after installation also got so many error messages. Its not working correctly spended so much time...
2. While using ODBC module need to install some drivers. but those sybase drivers not available for windows. It is available only for Unix OS only.
Finally i written one small code in java and converted to jar. and executing the jar file through command prompt.
Its working fine. Still i am expecting the solution through perl instead of using of jar file..
Please let me know your comments..
Hope so above two procedures may work for some people, but still getting some issues from my side. It will take long time...
So expecting simple procedure to connect to sybase.
| [reply] |
Normally the ODBC-drivers for Sybase can be obtained through the vendor. Third party ODBC-drivers for Sybase seem indeed only to exist for Unix-y kind of systems. And if you want to install the DBD::Sybase module, you probably will need a full install of Sybase as this module needs some compilation (I assume against the Sybase client -- didn't try it though for lack of Sybase on my system). What errors did you get when installing DBD::Sybase? Update: As a last resource you could try to have Perl interface with the JDBC driver for Sybase through JDBC or DBD::JDBC.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] |