Products

Price/Order

Support

Partners

Testimonials

Test Results

About us

Contact
 ADO DB Example
Bottom
 
Total posts: 9
 Author ADO DB Example
Malcolm Cheyne

25.02.2007 12:27:42
Registered user
Hi Glynn

After downloading the example DB and trying to compile I get an error at {$IFNDEF IDE_0} in the file rtcDBTypes.  (Using BDS2006).

I understand what the error means just don't know why/where to DEFINE.  Any hints ?

Malcolm
Danijel Tkalcec [RTC]

25.02.2007 16:02:48
Registered user
Hi Malcolm,

please replace the "RTC_DB2FIELD_TYPE" constant from the rtcDBTypes unit with...

const
  RTC_DB2FIELD_TYPE: array[TFieldType] of TRtcFieldTypes =
    ( ft_Unknown, ft_String, ft_Smallint, ft_Integer, ft_Word,
      ft_Boolean, ft_Float, ft_Currency, ft_BCD, ft_Date, ft_Time, ft_DateTime,
      ft_Bytes, ft_VarBytes, ft_AutoInc, ft_Blob, ft_Memo, ft_Graphic, ft_FmtMemo,
      ft_ParadoxOle, ft_DBaseOle, ft_TypedBinary, ft_Cursor, ft_FixedChar, ft_WideString,
      ft_Largeint, ft_ADT, ft_Array, ft_Reference, ft_DataSet
      {$IFNDEF IDE_0}
      ,ft_OraBlob, ft_OraClob, ft_Variant,
       ft_Interface, ft_IDispatch,ft_Guid
        {$IFNDEF IDE_1}
        , ft_TimeStamp, ft_FMTBcd
          {$IFDEF IDE_2006up}
            , ft_WideString, ft_WideString, ft_TimeStamp, ft_Variant
          {$ENDIF}
        {$ENDIF}
      {$ENDIF} );


Regards,
Danijel
Glynn Owen [RTC]

25.02.2007 17:06:41
Registered user
Hi Malcolm -

Thank you for uncovering this problem - and thank you, Danijel, for providing a solution so quickly.

I hope you find this article of some use in coming to grips with the realities of programming for access to remote databases using the RTC SDK. Unfortunately, it won't do much for the project you mentioned in your other post because it it does not return its results in an html form. I intend to write additional articles and examples around the "accessing remote databases" concept, and had planned to address this issue sometime in the next few weeks. Keep an eye on the "Articles and Case Studies" forum and you will see this Real Soon Now. This week, I will be showing a method for doing remote updates of individual records.

One thing you should try on your own is writing a replacement for the ADO_DM module of my example. Your replacement should use NexusDB components to do what needs to be done to implement the IDBDemo interface you can see in the SrvrDM module. I'm sure it wouldn't be very different from what I've done in the ADO_DM module.

Regards,
Glynn
Malcolm Cheyne

25.02.2007 17:22:07
Registered user
Thanks for the quick replies Danijel and Glynn.

I now have it all compiled and running.  Now to do a bit of study on how it all works and how I can take you up on your challenge Glynn. ;-)
Glynn Owen [RTC]

25.02.2007 18:34:21
Registered user
Glad to hear it. Let me know if I can help.

Glynn
Danijel Tkalcec [RTC]

25.02.2007 20:27:56
Registered user
Looks like Malcolm has it working with NexusDB. He sent me an image of the Client displaying records from a NexusDB table, but I'm not sure if I can show it here (has a lot of company names in).

Regards,
Danijel
Malcolm Cheyne

27.02.2007 05:31:31
Registered user
Thanks for that consideration Danijel.

That image did have some (not confidential) client name and address details showing but I prefer to show something from the public domain.

I have re-done the interface using the NexusDB "Northwind" database.  These files can be downloaded from the NexusDB website located at http://www.nexusdb.com/showpage.asp?Id=70.  A new image has been sent to Danijel for display purposes.

To convert to NexusDB is simply a matter of replacing the ADO Data Module with a NexusDB Data Module (with a full set of NexusDB connection components).  Set the "northwind" alias on the nxServer, start the modified DB example and run the client program.

Malcolm
Glynn Owen [RTC]

27.02.2007 06:57:50
Registered user
Great! Thanks a lot.

I'm about to post another article based on the same code, but with an editable grid on the Client side. I hope you find it useful. It will be available tomorrow (my tomorrow - your today is already my tomorrow <:))

Regards,
Glynn
Danijel Tkalcec [RTC]

27.02.2007 12:05:25
Registered user
Thanks for the image, Malcolm.



Best Regards,
Danijel Tkalcec