Working with WPF & SQL database - sql

I'm into creating a simple contact management application to test how WPF works with SQL database. is there any WPF-code for that shows how to connect with SQL database ? save and update data?
I'm using KaXML/Sharp-develop for WPF and using SQLite/MS-SQL server 2005.
I can't use Visual studio express(not allowed to install,anyway that's another issue)
Do i need to work with cs files (c# code) for this ?
(Sorry, very limited links regarding this using google)
any help with how to add data grid and relative code will help a lot.
other than that you can point me to question/blog posts/forum entry that covers my problem.
Thanks

There are a few good starter videos in WindowsClient.net
For this task I recommend you How Do I: Create a Simple WPF DataGrid to Edit Tabular Data

Related

UWP GridView .xml data binding [VB.NET]

Dear all I am struggling to bind my .xml data to GridView in my UWP project. I could not find any example how to bind .xml data to GridView. Could you please help me giving a sample code which shows how to bind .xml data UWP GridView. Please note that my .xml data is very large (5000 rows).
Thank you very much.
Of course, database can be used in UWP apps. If your UWP app target on version 16299 and later, you can use both SQLite and SQL Server database base on your selection. If your app need to be compatible with previous version, you can only use the SQLite database, since SQL Server database begin to support on version 16299.
There are many info on the internet to introduce to use SQLite and SQL Server database, but they are all using C#, it would be similar on VB project.
Here are the introduction using SQLite database:
https://learn.microsoft.com/en-us/windows/uwp/data-access/sqlite-databases
https://blogs.windows.com/buildingapps/2017/02/06/using-sqlite-databases-uwp-apps/#YGMf6G0GsZzBG4YG.97
Here is the detailed introduction using SQL Server database:
https://learn.microsoft.com/en-us/windows/uwp/data-access/sql-server-databases

Change database schema in published Lightswitch application

I have created a functioning LightSwitch (Visual studio 2012 Pro) application...
Now it's time to publish! The only problem is that I can't seem to figure out how to change the schema name to something other than dbo.
That is, I don't want the output tables to be dbo.XXXX, I want them to be my_schema.XXXX instead.
Also, note that the database is on SQL Server 2005.
Does anyone have suggestions on how to achieve this?
Thanks!
Update: Sorry for not being specific. I don't want to change the schema for existing tables in my database. I want my LightSwitch application to use the new schema. I don't mind publishing it and then modifying the schema on the tables, if I can then somehow also modify the LightSwitch application to use the new schema. But ideally, there would be a way to tell LightSwitch to use a different schema when it publishes.
For those who don't know what LightSwitch is, it is a Microsoft .Net Rapid Application Development tool for SilverLight business applications, and is built into Visual Studio 2012. My application is written in VB.Net
You can't change the schema name for an intrinsic database (the database that is created with LightSwitch). Maybe you'll be able to in V3, but you can't currently do it in V1 or V2. To achieve this, you'll have to create the database in something like SSMS (SQL Server Management Studio, then attach to it as an external data source.
Seeing as you've already done all the creating in LightSwitch, you could publish it as is, then attach to it as I mentioned above. I hope you don't have screens created, because unless you want to manually edit all of the lsml, you won't be able to use the attached database in any already created screens.
Any time you need to do something "out of the ordinary" with LightSwitch's database, you need to create it outside of LightSwitch, then attach to it. Why? LightSwitch was originally created with the idea in mind that the users didn't need to know anything about SQL Server.

Save Data from WinForms Controls to a SQL Server Database

So I am just getting started with this. New to .NET, SQL Server, C#, VB.NET, etc and the closest thing I have to related to this is some experience with MS Access and the VBA that relates to that and MS Office automation.
So I do have Visual VB.NET 2008 Express installed, SQL Server 2005 express installed, and I do know how to start a brand new project in VB.NET, and then add the database to the solution explorer, modify the tables/fields, etc. I know how to create a WinForm, add some controls (and name them and whatnot).....
So in MS Access I know how to use VB in the Code-Behind-Form to use the form in an unbound manner, and insert data into the tables via Visual Basic with SQL statements. I am looking to be able to begin the same sort of thing here, because I guess I have to start somewhere?
This may be a bit overwhelming, but I'd start with the videos here: http://windowsclient.net/learn/
and in particular, look for the data videos at the bottom of this page.
http://windowsclient.net/learn/videos.aspx

References/walkthroughs for maintaining database schemas with Visual Studio 2010?

I have Visual Studio 2010 Beta 2 and SQL Server 2008 installed. I'm working with a populated database and want to modify various column types. SQL Server Management Studio requires me to drop tables to do this, and get pretty finicky given my moderate level of knowledge of SQL Server.
However, I heard the new database project type supports changing the database schema to the desired format and it will handle creating and running all the scripts to implement the changes.
I've created a VS2010 database project using the existing database as the source, but so far haven't had much luck figuring out the appropriate method to make the changes without getting an error.
As a result, I'm looking for any reference info I can find on using VS2010's capabilities in this area. Any suggestions?
write scripts instead of using the gui. You can use alter table for instance to change a column. Never use a GUI of any kind to create a change to a database table.
Here's a walk through of the new VS2010 "Deploy-SQL" tab in the properties page of web application projects.

External Tool Development for SQL Server Management Studio 2005

Does anyone have any experience of developing external tools for SSMS 2005.
Ideally I would like to be able to interact with the query windows directly, for example, taking the query text from the window to perform some processing on it.
Any pointers in the right direction would be great.
Thanks in advance
Very late entry...
Example of how to do it here
And here too
Have you looked at Sql Server Management Objects (SMO)?
http://msdn.microsoft.com/en-us/library/ms162557.aspx
The best example of this I have seen for SSMS is SQL Prompt by Red Gate
SQL Prompt runs a seperate .NET app that sits in your systray and is in some way part of the magic of the integration.
For loading an add-in, you will want to create a key under:
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\Shell\AddIns\
...in order to have SSMS load your add-in.
Hope this helps
This link explains adding external tools to ssms with screen shots.
It also has procedure to add them as a button.
http://sqlserverlearner.com/2011/sql-server-external-tools