Hi, thanks for the code but it doesn't seem to work either. Do I have to incorporate some other codes here or not. Ia pologize if 'm not that good with it coz I'm still just a newbie with watir...
 
Can you give me with detailed explanation or other things about integrating watir and SQL Server???

Unmesh Gundecha <[EMAIL PROTECTED]> wrote:
Hi,
 
Try following Ruby code to connect to SQL Server. This uses ADO classes to connect to database.
 
require 'win32ole'

$rsOne = WIN32OLE.new('ADODB.Recordset')


puts "Start Time >> " << (Time.now).to_s

$con = WIN32OLE.new('ADODB.Connection')
$con['connectionstring'] = 'Test1' #DSN Name
$con.open

$rsOne = $con.execute('SELECT UserName FROM tblUser')

until $rsOne['eof'] == true and $rsTwo['eof']== true

puts $rsOne.Fields(0).Value

$rsOne.MoveNext()

end


Best Regards,
Unmesh

Daniel Browne <[EMAIL PROTECTED]> wrote:
I don't have experience with Ruby and SQL Server together, however I
imagine the people who do have such experience will be more willing to
respond if you tell them about what you have tried and the
errors/issues encountered. Thanks.

Cheers,
Daniel.


On 20/06/06, jet ibaÿfffff1ez <[EMAIL PROTECTED]>wrote:
>
> I'm having a problem with one of the projects i'm handling right now. I was
> asked to create automation scripts using watir that could also access SQL
> Server 2000.
> Can anybody help me out with this???
> I've read some of the posts here regarding database connectivity but it
> doesn't seem to work and I can't figure out how I can make them to work.
> Please help me out guys. Thanks in advance...
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
> _______________________________________________
> 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


Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta._______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Send instant messages to your online friends http://uk.messenger.yahoo.com

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to