Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Realbasic > Re: access to A...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 6 Topic 3250 of 3326
Post > Topic >>

Re: access to Access

by Lewis Gardner <lgardner@[EMAIL PROTECTED] > Aug 22, 2007 at 12:30 AM

Dave wrote:
> I've been reading some old posts that talk of an inability to connect
> to an Access database with RB.  Is that (still) true?  If so, that
> would be a show stipper for us.

RB connects to Access via ODBC fairly easily. Here is a simple example 
of reading data from a MBD:

   Dim db as ODBCDatabase
   db=New ODBCDatabase
   dim curTotal As Currency

   db.DataSource= "Driver={Microsoft Access Driver (*.mdb)}; DBQ=my.mdb "

   If db.Connect then

     dim rs As RecordSet
     rs = db.SQLSelect("SELECT ID, Amount FROM tblPaymentDetail")

     while not rs.EOF
       curTotal = curTotal + rs.Field("Amount").Value
       rs.MoveNext
     wend

     EditField1.Text = Format(curTotal, ",###.##")

   else
     MsgBox "The connection failed."
   end if
 




 6 Posts in Topic:
access to Access
Dave <davegp2@[EMAIL P  2007-08-21 11:05:58 
Re: access to Access
Joe Strout <joe@[EMAIL  2007-08-21 14:39:49 
Re: access to Access
Lewis Gardner <lgardne  2007-08-22 00:30:06 
Re: access to Access
Dave <davegp2@[EMAIL P  2007-08-22 06:08:48 
Re: access to Access
Eugene <eugenedakin@[E  2007-08-22 15:48:25 
Re: access to Access
Dave <davegp2@[EMAIL P  2007-08-23 07:55:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 15:37:22 CDT 2008.