<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Title of this RSS flow</title><link>http://www.programmingado.net/sp/rss.aspx</link><description>Description of RSS</description><ttl>5</ttl><item><title><![CDATA[ Importing CSV file into SQL Server ]]> </title><link>http://www.programmingado.net/a-629/Importing-CSV-file-into-SQL-Server.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-629/Importing-CSV-file-into-SQL-Server.aspx</guid><description><![CDATA[ Lets say you have a CSV (comma separated file) and you need to import it into SQL Server. The quickest way to accomplish that is to use the OPENROWSET function.
EEEContent_1
You might get an error saying that function isn't enabled in SQL 2005, but all you need to do then is open the SQL Server surface administration and activate it (under "functions"). 
Now, if you are facing a TAB separated file I use the following trick:
First create a schema.ini file in the same directory as the TAB delimited file
... ]]> </description><pubDate>Wed, 26 Sep 2007 23:19:14 GMT</pubDate></item><item><title><![CDATA[ Explaining the code ]]> </title><link>http://www.programmingado.net/a-377/Explaining-the-code.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-377/Explaining-the-code.aspx</guid><description><![CDATA[   
I have used Visual Studio 2005 - meaning .NET 2.0. And it's a commandline program - single file - program.cs. 
I will now take you through the code - lets start with Main:
EEEContent_1
We are using the AMS.Profile component to read the conf.xml file and first check if we should run the backup at all.
Lets dive into RunMySQL - cause the MSSQL looks pretty much the same actually.
EEEContent_2
We start by retrieving all configuration settings, we then create a connection to the MySQL server... ]]> </description><pubDate>Thu, 05 Jul 2007 03:31:44 GMT</pubDate></item><item><title><![CDATA[ Download free database backup tool ]]> </title><link>http://www.programmingado.net/a-378/Download-free-database-backup-tool.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-378/Download-free-database-backup-tool.aspx</guid><description><![CDATA[   
Version 1.0 contains just functionality for database backup - MySQL and MSSQL. The download contains a solution for VS2005 - but also in the bin/debug/ folder you will find the exefile if you don't have possibility to compile the code yourself.
Please read all other articles on how to configure the tool before running.
  ]]> </description><pubDate>Thu, 05 Jul 2007 03:15:27 GMT</pubDate></item><item><title><![CDATA[ Configuration of free backup tool ]]> </title><link>http://www.programmingado.net/a-376/Configuration-of-free-backup-tool.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-376/Configuration-of-free-backup-tool.aspx</guid><description><![CDATA[  
The file conf.xml is used for configuration settings. Make sure that file is placed in the same directory as your dbbackup.exe file.
EEEContent_1
There are two sections - one for MySQL and one for MSSQL. 
Backup: true/false
Set to true of you want to run the backup. Most used for testing purposes
PathToResult: path
The place where the resulting backup files will be placed. Please note that you can use the special variable DD-YYYYMMDD which will then be translated to something like 2006101... ]]> </description><pubDate>Thu, 05 Jul 2007 03:10:35 GMT</pubDate></item><item><title><![CDATA[ About backup tool ]]> </title><link>http://www.programmingado.net/a-375/About-backup-tool.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-375/About-backup-tool.aspx</guid><description><![CDATA[  
Version 1.0 of the Simple Backup Tool just supports backing up databases. Both MySQL and MSSQL are supported.
The code is written in C# - a simple (one file)  command line program. It uses some external components - first MySQL data driver of course - but also a pretty cool XML configuration reader dll - AMS.Profile developed by Alvaro Mendez.
All files needed are however included in the downloadable solution. ]]> </description><pubDate>Thu, 05 Jul 2007 03:09:56 GMT</pubDate></item><item><title><![CDATA[ Usage of free backup tool ]]> </title><link>http://www.programmingado.net/a-374/Usage-of-free-backup-tool.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-374/Usage-of-free-backup-tool.aspx</guid><description><![CDATA[ conf.xml
EEEContent_1
When run  (  >dbbackup.exe conf.xml )  the result will look like this:

And in the mssql/mysql folders the backup files are available:

 ]]> </description><pubDate>Thu, 05 Jul 2007 03:09:17 GMT</pubDate></item><item><title><![CDATA[ ADO.NET Retrieving last inserted id from sql server ]]> </title><link>http://www.programmingado.net/a-367/ADONET-Retrieving-last-inserted-id-from-sql-server.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-367/ADONET-Retrieving-last-inserted-id-from-sql-server.aspx</guid><description><![CDATA[ Just a small addition to the Inserting into SQL Server with parameterized query.
You might have noticed that the products table has a autonumber field, id, and often it's very useful to get that value of the just inserted record.
Well, lets just use some other trick we learned - multiple queries in a single command
So we call it like this:
EEEContent_1
and the lId will contain the new records identity value.
EEEContent_2
Now, to note is of course the ; select @@identity addition in the end of th... ]]> </description><pubDate>Tue, 03 Jul 2007 13:34:39 GMT</pubDate></item><item><title><![CDATA[ Inserting into SQL Server with parameterized query ]]> </title><link>http://www.programmingado.net/a-366/Inserting-into-SQL-Server-with-parameterized-query.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-366/Inserting-into-SQL-Server-with-parameterized-query.aspx</guid><description><![CDATA[ Now lets insert some data to the Products table.
EEEContent_1
So now we create a C# function wrapping the SQL Insert call:
EEEContent_1
Not much to talk about. Like executing any parameterized query at all, one thing though you might note is the SqlDBType.Bit which maps to a C.NET bool. Make perfect sense, actually.
  ]]> </description><pubDate>Tue, 03 Jul 2007 13:25:57 GMT</pubDate></item><item><title><![CDATA[ Call stored procedure against SQL Server ]]> </title><link>http://www.programmingado.net/a-365/Call-stored-procedure-against-SQL-Server.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-365/Call-stored-procedure-against-SQL-Server.aspx</guid><description><![CDATA[ If you have followed this little article serie on ADO.NET and SQL Server you have probably read the article on Parameterized queries with ADO.NET.
If so then this little code snippet will be dead easy and not worth much but I will publish it here anyway to make the "collection" complete.
Lets call the CustOrderHist stored procedure. The signature looks like this:
CREATE PROCEDURE CustOrderHist @CustomerID nchar(5)
...
For simplicity I hardcode the parameter value (BERGS) 
EEEContent_1
The big po... ]]> </description><pubDate>Tue, 03 Jul 2007 13:07:53 GMT</pubDate></item><item><title><![CDATA[ ADO.NET SQL Server and parameterized queries ]]> </title><link>http://www.programmingado.net/a-312/ADONET-SQL-Server-and-parameterized-queries.aspx</link><guid isPermaLink="true">http://www.programmingado.net/a-312/ADONET-SQL-Server-and-parameterized-queries.aspx</guid><description><![CDATA[ Never build your SQL by concatenating an long SQL command stirng is a good practice considering SQL injection risks. I admit I sometimes "cheats" - I mean say this example
EEEContent_1
This example would NOT be open for injection attacks (it mostly involves strings) , cause .NET typesafety ensures that GetCats function is never called with something else than a long. 
However take my advise and NEVER build the SQL command - here's how to do it:
EEEContent_2
I mean, if you are using some ... ]]> </description><pubDate>Wed, 27 Jun 2007 10:03:14 GMT</pubDate></item></channel></rss>