Using Vruby instead of VB?

From: Shashank Date [mailto:sdate@everestkc.net]
Sent: Saturday, November 22, 2003 1:37 PM
To: ruby-talk ML
Subject: Using Vruby instead of VB ?

Inspired by Steve’s presentation at RubyConf-2003, (
thanks to zenspider, see:

Steve Tuckner: Ruby World: (Not) Implemented
www.zenspider.com /dl /rubyconf2003 /RubyNotImplemented.tar.gz
)

I am looking at the possibility of using Vruby/Swin instead
of VisualBasic to develop a small (commercial) application on
Windows. This application has
to:

  1. Have native (Windows) look and feel

I think Vruby/Swin will give you that from what I’ve read. I haven’t
actually tried it. I’m a bit concerned that the author says his
development environment is Windows 98, but perhaps it’s a non-issue.

  1. Interface with MS Access (possibly with MS SQL Server2K in
    future)

I thought you could use ODBC to interface with MS Access, but I’m not
positive. Otherwise, it ought to be possible via OLE (right?). There’s
no specific DBD for either Access or SQL Server that I know of.

  1. Print reports in landscape and portrait mode

Eek - now you’re talking hardware interfaces - way out of my realm.

  1. Run only on one machine (no networking etc)

Simple enough - don’t create any sockets or pipes that would allow
networking. :slight_smile:

With Steve Tuckner, Dan Berger, Park Heesob and many other
Win / Ruby experts on my side, I feel like taking the risk :wink:

What do Rubyists have to say ? Any gotchas I need to be aware of ?

– shanko

We’ll help as we can, I’m sure. :slight_smile:

Regards

Dan

···

-----Original Message-----

> -----Original Message-----

> From: Shashank Date [mailto:sdate@everestkc.net]

> Sent: Saturday, November 22, 2003 1:37 PM

> To: ruby-talk ML

> Subject: Using Vruby instead of VB ?

>

···

On Sun, 23 Nov 2003, Berger, Daniel wrote:

> 2. Interface with MS Access (possibly with MS SQL Server2K in

> future)

I thought you could use ODBC to interface with MS Access, but I’m not

positive. Otherwise, it ought to be possible via OLE (right?). There’s

no specific DBD for either Access or SQL Server that I know of.

I’m almost 100% certain ODBC will do the trick. Back in the bad old days,
I did some web stuff with Access in development in Sybase in production.

>3. Print reports in landscape and portrait mode

Eek - now you’re talking hardware interfaces - way out of my realm.

This might help:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/32861

Chad

Hi,

I think Vruby/Swin will give you that from what I’ve read. I haven’t
actually tried it. I’m a bit concerned that the author says his
development environment is Windows 98, but perhaps it’s a non-issue.

Yes, Vruby/swin gives that , and Win 98 is a non-issue (yet).

  1. Interface with MS Access (possibly with MS SQL Server2K in
    future)

I thought you could use ODBC to interface with MS Access, but I’m not
positive. Otherwise, it ought to be possible via OLE (right?). There’s
no specific DBD for either Access or SQL Server that I know of.

Yes, I will use ODBC (or OLEDB, whichever turns out to be easier ;-)).
ODBC Performance is not a big issue yet since the database is very small.

  1. Print reports in landscape and portrait mode

Eek - now you’re talking hardware interfaces - way out of my realm.

The feature list on this website says something about “using printer with
swin”
http://www.osk.3web.ne.jp/~nyasu/vruby/vrproject-e.html#feature

I will have to find out what it is all about. (if only I could
read/understand
Japanese … sigh)

  1. Run only on one machine (no networking etc)

Simple enough - don’t create any sockets or pipes that would allow
networking. :slight_smile:

Yes :slight_smile:

And I spent about an hour installing the “nifty” FormDesigner:

http://homepage3.nifty.com/Yukimi_Sake/ruby.html

But it is worth the pain. Will keep you posted.

We’ll help as we can, I’m sure. :slight_smile:
Dan

Thanks Dan.
– shanko

  1. Interface with MS Access (possibly with MS SQL Server2K in
    future)

I used ODBC with free download of Microsoft Data Access Components
(mdac_typ.exe) and I was able to create/update/select Access tables,
even though I don’t have Access installed.

http://www.microsoft.com/downloads/results.aspx?freetext=odbc

–Laza

“Chad Fowler” chad@chadfowler.com wrote in message

I’m almost 100% certain ODBC will do the trick. Back in the bad old days,
I did some web stuff with Access in development in Sybase in production.

Yep.

>3. Print reports in landscape and portrait mode

This might help:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/32861

Chad

Thanks , Chad … I somehow missed that.
– shanko

“Shashank Date” wrote:

Hi,

  1. Print reports in landscape and portrait mode

The feature list on this website says something about “using printer with swin”

http://www.threeweb.ad.jp/~nyasu/vruby/samples-e.html
(labeled “using priner” - which probably defeats Google)
^t

… refers to the author’s sample printer script:
http://www.threeweb.ad.jp/~nyasu/vruby/sample/printer.rb

···

If you do use Win32OLE to script MS Access, OLE printing should be usable also ?

Wiki references for /other/ MS Office apps.

Of possible interest (from Access/VBA help):

PrintOut method -
.PrintOut [printrange][, pagefrom, pageto][, printquality][, copies][, collatecopies]

PrtDevMode property - [Orientation] member (amongst others)
An Integer that specifies the orientation of the paper.
It can be either 1 (portrait) or 2 (landscape).

Haven’t played this; good luck,

daz

“Zoran Lazarevic” zoranlazarevic@yahoo.com wrote in message

(mdac_typ.exe) and I was able to create/update/select Access tables,
even though I don’t have Access installed.

http://www.microsoft.com/downloads/results.aspx?freetext=odbc

Thanks for the link. Which version of ruby and MDAC did you work on ?

Thanks for the link. Which version of ruby and MDAC did you work on ?

I am using Ruby 1.8.0 and the latest download of MDAC 2.8 as of two weeks ago.

–Laza