[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Desktop Database Application in Ruby

Roman Rapido

1/16/2009 6:09:00 AM

Has anyone among the members made database application in Ruby? I want
to learn ruby and create a desktop database application like Point of
Sale, Inventory, Library management System etc wherein updates in 2 or
more tables is done, please helpby uploading your sample projects.Even
if it is not a complete database application as long as it shows how to
update 2 or more tables in a 1 to many or many to many realtionship in a
MYSQL, thanks.
--
Posted via http://www.ruby-....

7 Answers

Mohit Sindhwani

1/16/2009 7:13:00 AM

0

Warren Dulnuan wrote:
> Has anyone among the members made database application in Ruby? I want
> to learn ruby and create a desktop database application like Point of
> Sale, Inventory, Library management System etc wherein updates in 2 or
> more tables is done, please helpby uploading your sample projects.Even
> if it is not a complete database application as long as it shows how to
> update 2 or more tables in a 1 to many or many to many realtionship in a
> MYSQL, thanks.
>
I haven't tried this, but would this help you:
http://rsqlitegui.ruby...
It's a desktop GUI software for the SQLite database, written in Ruby.

Cheers,
Mohit.
1/16/2009 | 3:13 PM.


Brian Candler

1/16/2009 11:12:00 AM

0

Warren Dulnuan wrote:
> Has anyone among the members made database application in Ruby? I want
> to learn ruby and create a desktop database application like Point of
> Sale, Inventory, Library management System etc wherein updates in 2 or
> more tables is done, please helpby uploading your sample projects.Even
> if it is not a complete database application as long as it shows how to
> update 2 or more tables in a 1 to many or many to many realtionship in a
> MYSQL, thanks.

See also the answers you got when you asked this exact same question
last month.
http://www.ruby-...to...

You seem to be asking two separate questions:
- can I have sample code for a GUI application?
- can I have sample code for MySQL database access?

Both of these depend entirely on which GUI framework (*) and which
database framework (**) you're going to use. Of course, your choice may
be influenced by what you see. There are many previous threads you can
read discussing the pros and cons of each.

(*) e.g. tk, fox, ruby-cocoa, shoes, ... I'm afraid I don't use any of
these and I'm sure I've missed some other important options

(**) e.g. ActiveRecord, sequel, datamapper, og, ruby-dbi, or even direct
low-level ruby-mysql / mysql-ruby

Each one comes with its own documentation and code samples you can run
and play with.
--
Posted via http://www.ruby-....

richard.j.dale@gmail.com

1/16/2009 12:05:00 PM

0

On Jan 16, 6:08 am, Warren Dulnuan <rr3...@gmail.com> wrote:
> Has anyone among the members made database application in Ruby? I want
> to learn ruby and create a desktop database application like Point of
> Sale, Inventory, Library management System etc wherein updates in 2 or
> more tables is done, please helpby uploading your sample projects.Even
> if it is not a complete database application as long as it shows how to
> update 2 or more tables in a 1 to many or many to many realtionship in a
> MYSQL, thanks.
> --
> Posted viahttp://www.ruby-....
You can use Rails ActiveRecord with any GUI toolkit, it doesn't depend
on the rest of Rails.

QtRuby includes a couple of ActiveRecord based 'model' classes (that
is Qt models, not ActiveRecord ones) to make it easier to use for
showing database data in Qt::TableView and Qt::TreeViews.

-- Richard

Logan Barnett

1/16/2009 4:55:00 PM

0


On Jan 15, 2009, at 11:08 PM, Warren Dulnuan wrote:

> Has anyone among the members made database application in Ruby? I want
> to learn ruby and create a desktop database application like Point of
> Sale, Inventory, Library management System etc wherein updates in 2 or
> more tables is done, please helpby uploading your sample projects.Even
> if it is not a complete database application as long as it shows how
> to
> update 2 or more tables in a 1 to many or many to many realtionship
> in a
> MYSQL, thanks.
> --
> Posted via http://www.ruby-....
>

Warren,
Check out Monkeybars (http://monk...), a JRuby GUI framework
that's BYOM (Bring Your Own Model). We actually have commercial
applications written in Monkeybars (http://get...) that are
driven by a database. JotBot uses Sequel for its ORM to connect to a
local H2 (think SQLite) database, and an app I'm writing for a client
right now is using ActiveRecord which connects to MySql. Apps written
in Monkeybars are cross platform, and don't require your users to
install Ruby in advance. Rawr helps bundle these apps together, so you
can distribute native .app and .exe files for OS X and Windows.

We're on #monkeybars on freenode, and we're active on the mailing list.

Roman Rapido

1/17/2009 12:04:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

Thanks a lot i really appreciate your help, i'l try to visit monkey bars,
i'm trying to build a POINT OF SALE for my little retail business. i hope
you can further help me on this.

Cheers

On Fri, Jan 16, 2009 at 8:55 AM, Logan Barnett <logustus@gmail.com> wrote:

>
> On Jan 15, 2009, at 11:08 PM, Warren Dulnuan wrote:
>
> Has anyone among the members made database application in Ruby? I want
>> to learn ruby and create a desktop database application like Point of
>> Sale, Inventory, Library management System etc wherein updates in 2 or
>> more tables is done, please helpby uploading your sample projects.Even
>> if it is not a complete database application as long as it shows how to
>> update 2 or more tables in a 1 to many or many to many realtionship in a
>> MYSQL, thanks.
>> --
>> Posted via http://www.ruby-....
>>
>>
> Warren,
> Check out Monkeybars (http://monk...), a JRuby GUI framework that's
> BYOM (Bring Your Own Model). We actually have commercial applications
> written in Monkeybars (http://get...) that are driven by a
> database. JotBot uses Sequel for its ORM to connect to a local H2 (think
> SQLite) database, and an app I'm writing for a client right now is using
> ActiveRecord which connects to MySql. Apps written in Monkeybars are cross
> platform, and don't require your users to install Ruby in advance. Rawr
> helps bundle these apps together, so you can distribute native .app and .exe
> files for OS X and Windows.
>
> We're on #monkeybars on freenode, and we're active on the mailing list.
>
>

Mike

12/15/2009 8:30:00 PM

0

Try to format it before you copy the recordset

"Mike" wrote:

> Thanks Mike but I tried formatting the cells after the recordset is copied
> and the time always is 12:00:00 AM.
>
> For example, the labeldate field in Access (formatted as Date/Time) has a
> stored value of 11/17/2009 2:35 PM. When this record is pulled into Excel
> using the query below, the labeldate field results in 11/17/2009 and does not
> bring in the time field.
>
> Mike
>
> "Mike" wrote:
>
> > You need to format the column that the date is in.
> > Columns("A:A").NumberFormat = _
> > "[$-409]m/d/yy h:mm AM/PM;@"
> >
> > "Mike" wrote:
> >
> > > I have an excel file which queries a backend Access database using the code
> > > below. The labeldate field is a date/time field in Access. When I run the
> > > query and get the data into a worksheet, Excel removes the time and just
> > > dumps the date. I tried formatting the labeldate field in Excel but it only
> > > shows the date. I ran the same query in Access and the labeldate field showed
> > > the full date and time in the query result. I need some help as to explain
> > > why the time is missing.
> > >
> > > strsql = "SELECT AddresseeCity, AddresseeState, mailingcity, senderstate,
> > > mailingstate, country, addresseename, addresseeaddress, " & _
> > > "addresseezip, labeldate, labelnumber, mailservice,
> > > totalpostage, originzip, " & _
> > > "WgtPkginLbs, ozs, flatrate FROM seizures WHERE " & _
> > > "labeldate >=#" & beg & "# and labeldate <=#" & fin & "# AND
> > > (addresseestate = '" & state & "');"
> > >
> > > cnn.Open stcon
> > > rst.Open strsql, cnn, adOpenForwardOnly, adLockOptimistic
> > > 'recs1 = rst.RecordCount
> > > Worksheets("Data").Select
> > > i = 1
> > > For Each fld In rst.Fields
> > > ActiveSheet.Cells(1, i).Value = fld.Name
> > > i = i + 1
> > > Next fld
> > > 'On Error Resume Next
> > > Worksheets("Data").Range("A2").CopyFromRecordset rst

Mike

12/15/2009 9:13:00 PM

0

Thanks, I was able to determine that the problem was with how the labeldate
was loaded into the Access database. i was referencing 2 tables and the one
table had the date format as just date and not date and time.

thanks for the help.

Mike

"Mike" wrote:

> Try to format it before you copy the recordset
>
> "Mike" wrote:
>
> > Thanks Mike but I tried formatting the cells after the recordset is copied
> > and the time always is 12:00:00 AM.
> >
> > For example, the labeldate field in Access (formatted as Date/Time) has a
> > stored value of 11/17/2009 2:35 PM. When this record is pulled into Excel
> > using the query below, the labeldate field results in 11/17/2009 and does not
> > bring in the time field.
> >
> > Mike
> >
> > "Mike" wrote:
> >
> > > You need to format the column that the date is in.
> > > Columns("A:A").NumberFormat = _
> > > "[$-409]m/d/yy h:mm AM/PM;@"
> > >
> > > "Mike" wrote:
> > >
> > > > I have an excel file which queries a backend Access database using the code
> > > > below. The labeldate field is a date/time field in Access. When I run the
> > > > query and get the data into a worksheet, Excel removes the time and just
> > > > dumps the date. I tried formatting the labeldate field in Excel but it only
> > > > shows the date. I ran the same query in Access and the labeldate field showed
> > > > the full date and time in the query result. I need some help as to explain
> > > > why the time is missing.
> > > >
> > > > strsql = "SELECT AddresseeCity, AddresseeState, mailingcity, senderstate,
> > > > mailingstate, country, addresseename, addresseeaddress, " & _
> > > > "addresseezip, labeldate, labelnumber, mailservice,
> > > > totalpostage, originzip, " & _
> > > > "WgtPkginLbs, ozs, flatrate FROM seizures WHERE " & _
> > > > "labeldate >=#" & beg & "# and labeldate <=#" & fin & "# AND
> > > > (addresseestate = '" & state & "');"
> > > >
> > > > cnn.Open stcon
> > > > rst.Open strsql, cnn, adOpenForwardOnly, adLockOptimistic
> > > > 'recs1 = rst.RecordCount
> > > > Worksheets("Data").Select
> > > > i = 1
> > > > For Each fld In rst.Fields
> > > > ActiveSheet.Cells(1, i).Value = fld.Name
> > > > i = i + 1
> > > > Next fld
> > > > 'On Error Resume Next
> > > > Worksheets("Data").Range("A2").CopyFromRecordset rst