Ok, I have an old batch file that does exactly what I need. However, with out new administration we can't run the batch file anymore so I need to start up with C#.
I'm using Visual Studio C# and already have the forms set up for the application I need to build. (I'm learning as I go)
Here is what I need to accomplish in C# (This is the batch guts)
sqlcmd.exe -S .\PDATA_SQLEXPRESS -U sa -P 2BeChanged! -d PDATA_SQLEXPRESS -s ; -W -w 100 -Q "SELECT tPatCulIntPatIDPk, tPatSFirstname, tPatSName, tPatDBirthday FROM [dbo].[TPatientRaw] WHERE tPatSName = '%name%' "
Basically it uses SQLCMD.exe
with the already existing datasource called PDATA_SQLExpress
.
I've searched and gotten close but I'm still at a loss on where to start.