This is just a short post to introduce the fact that yesterday I managed to do in xBase what I had successfully done some six years ago in C# - that is have the code of my X# app create a new SQL database with multiple Tables, and then immediately populate those tables with test data. Everything done from code and in VS - because I am using WPF for a small form.
I will post much more here as I still need to do further tidying and improving work today. I am also writing the eNotes for Cologne as I am doing the development, so this takes a bit extra time.
It is my intent to try and post a link from a shared 'OneDrive' folder of mine, so that you can download and run the code yourselves, on your PC. As long as you have a "C:\Temp" folder on your system.
Yes, the L2S (LINQ to SQL)app currently drops and recreates the database each time it is run, adding the test data items just afterwards. Its all quite easy to do, not difficult to understand, BUT, like a lot of data stuff is a bit tricky to get right ;-0) Many little places where it can go wrong!
Attached / below is the result of this current test app in Management Studio - three tables Customer, Invoice, Product. I have included a shot of the Customer test data in image '_02'.
Hope this interests a few of you guys - this is all part of going to Entity Framework - L2S is good practise for EF6/7 apps.
actually I have finished something also for Firebird - my choice for a SQL database because it is free, powerful and available on Linux and Windows - even a "all-contained" solution for a single user database is available, completely configuration free.
My code even checks the current table structure and adds/modifies missing/changed fields.
Unfortunately I had to write code specific to Firebird....
If someone is interested, I can make a working sample.
Just so that the other guys are aware, the reason I posted the original message about a 'first for X#' was not the connection to the SQL database itself - we could do that with ADO.NET in Vulcan over 7 years ago - it was the fact that all the communication with the SQL database 'engine' was done using compiled X# code. From the very creation of the DB through to its Table creation and population, and subsequent data retrieval querying.
Sending a character string through to the DB engine (for us) is what the technology is all about - any T-SQL statements sent to the DB Server have all been composed 'under-the-hood' by the Microsoft LINQ to SQL (L2S) technology, and that is VERY clever.
So all our stuff has the benefits of compiler checking, and us using data types which are .NET types, etc., etc.. Effectively, the SQL engine is hidden from view to us developers. All we need is a certain level of understanding as to how the SQL Server works.
I hope this makes some sense to most folks ;-0)
And don't forget it, we are really aiming to get to 'LINQ to Entities' with X# quite soon ;-0) With EF6/7 we can do more business like 'stuff' (Entities) and also the back-end data source can be other than MS SQL Server.