A 'First' for xBase - code creating a full SQL database !?
Posted: Wed Nov 30, 2016 10:06 am
Hi Robert, and all guys,
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.
Regards,
Phil.
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.
Regards,
Phil.