OK you've finally got me, X# is very cool!

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Anonymous

OK you've finally got me, X# is very cool!

Post by Anonymous »

Thanks to all for your help, you especially Chris, so far (no doubt it'll be needed again soon probably) . But finally I've got X# displaying windows with all sorts of controls on them, doing all sorts of magic that was almost impossible in VO (at least to me anyway)

One thing that still doesn't appear possible is changing the colour of the actual border on a Groupbox. That was a bugbear for me in VO, and I used a very sloppy workaround to get the desired look, but hopefully that might be added in a future release.of X#.

Only one thing, am I right in assuming I can't actually create a DBServer object and therefore not actually create a Database based program in X# at this point?
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

OK you've finally got me, X# is very cool!

Post by Chris »

Glad to see you are starting to enjoy X#! :)

Yeah, the GUI classes have remained the same in X#, but if you were using a trick for something, that trick should work also in X#. Possibly with minor changes, if it uses very low level stuff.

About DBServers, you can create them with no issue, only thing is you cannot import/export from a from/to a physical dbf file in the DBEditor. But you can create this dbf file by any other means (from the DBServer editor in VO, with code, from a DBF utility etc), put it in the folder that your app expects it and it should work fine, exactly as in VO. You just can't use CDX indexes just yet, but Robert has almost finished work on it, it should be available very soon.

Actually very soon we will get out of this hybrid mode we are at the moment, having to support both the vulcan and the X# runtime, the X# runtime will be the new standard one to use, so everything else will also become more straightforward, regarding the IDEs etc.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
BiggyRat

OK you've finally got me, X# is very cool!

Post by BiggyRat »

But how do you access that database? Like for example, putting fields on a form. I tried using a textbox (which I'm assuming is the X# equivalent of an SLE) I get you can't use DBFCDX yet (that of course is THE most important RDD to me). Databases are vitally important to my apps, so this is incredibly important.
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

OK you've finally got me, X# is very cool!

Post by lumberjack »

Jeff,
BiggyRat wrote:But how do you access that database? Like for example, putting fields on a form. I tried using a textbox (which I'm assuming is the X# equivalent of an SLE) I get you can't use DBFCDX yet (that of course is THE most important RDD to me). Databases are vitally important to my apps, so this is incredibly important.
Slow down cowboy...
One step at a time. We will get you there, are you able to already create a form with a DataGridView? If so, then start Reading about DataBinding, DbProviderFactories .... We still feeding the filly, just wait, we will rodeo...
______________________
Johan Nel
Boshof, South Africa
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

OK you've finally got me, X# is very cool!

Post by wriedmann »

Hi Jeff,
what type of data do you need? From DBF sources or from SQL databases?
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
BiggyRat

OK you've finally got me, X# is very cool!

Post by BiggyRat »

I use dbfcdx Wolfgang. Which I know is not ready yet, so just playing around with dbfntx.
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

OK you've finally got me, X# is very cool!

Post by wriedmann »

Hi Jeff,
I have to prepare a sample for you using WinForms and DBF.
Currently I have them only for WPF (my development choice).
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

OK you've finally got me, X# is very cool!

Post by lumberjack »

Hi Wolfgang,
Just wondering Paul Piko's VulcanAtWarpSpeed document should be a good read for somebody like Jeff. Just wonder about implications for sharing? It only for Vulcan users?
Regards,
______________________
Johan Nel
Boshof, South Africa
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

OK you've finally got me, X# is very cool!

Post by robert »

Johan,
I know Paul very well and he has no problem if you share this document.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

OK you've finally got me, X# is very cool!

Post by lumberjack »

Jeff,
BiggyRat wrote:I use dbfcdx Wolfgang. Which I know is not ready yet, so just playing around with dbfntx.
WinForms work with DataTable, BindingSource, DataSets... You can read up on them. Here is a small incomplete example of getting a DBF into a DataTable, no index required. Basically just a "select * from dbftable":

Code: Select all

DBUseArea(TRUE,"DBFCDX",dbfName)
// Make some columns for the table from each column in the DBF
FOR i := 1 UPTO FCount()
  datatable:Columns:Add( DataColumn{ FIELDNAME(i) } )
NEXT
// Now load with data
DO WHILE ! EOF()
  // Create a new row
  row := datatable:NewRow()
  // Put data into the columns in the row
  FOR i := 1 UPTO FCount()
    row[ FIELDNAME(i) ] := AsString(FieldGet(i))
  NEXT
  // Add the row to the table
  datatable:Rows:Add(row)
  // Move to next record
  DBSkip()
ENDDO
DBCloseArea()
If you now have your datatable, you need to tell your grid to use it as DataSource:

Code: Select all

tableGrid:DataSource := datatable
Voila, done, dusted!

If you want to sort your data, no set order to index.

Code: Select all

datatable:DefaultView:Sort := "LASTNAME desc"
Search datatable on MSDN, look at all the properties and methods. Get this in your knowledge base then we look at DataSets, DataBinding, DataSource, Relations etc...

Happy X#ing!
______________________
Johan Nel
Boshof, South Africa
Post Reply