Hi, I got the answer.The Data Source should be Server Name in the Connection string. The URL http://www.kitebird.com/articles/ruby-dbi.html gives good examples on Database.
Thanks for all the help. Jayashree -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Eli Smith Sent: Thursday, May 18, 2006 10:53 PM To: [email protected] Subject: Re: [Wtr-general] Database Connectivity - SQL Server I second Chris McMahon's emotion on using ODBC to get at the databases. I found this page wonderfully helpful in getting connected to SQL Server and Oracle: http://www.kitebird.com/articles/ruby-dbi.html It has examples of how to process returned rows, binding vars, the works. Enjoy, ~Eli-> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jayasree Sent: Thursday, May 18, 2006 12:08 AM To: [email protected] Subject: [Wtr-general] Database Connectivity - SQL Server Hi, I need help on connecting to SQL Server and get the records from the table.I used require 'dbi' dbh = DBI.connect("DBI:ADO:Provider=SQLOLEDB;Data Source=(rubytest);Initial Catalog=Ambigo;User Id=sa;Password=sa;") I am getting Error as :SQL Server does not exist or access denied. Can I get Example Programs on Database Connectivity. Thanks, Jayashree. -- Disclaimer: This e-mail, and any files transmitted with it are confidential to Marlabs Inc. and intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general Disclaimer: This e-mail, and any files transmitted with it are confidential to Marlabs Inc. and intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
