feeds2read
Latest Flows from this sub-category:
realtimecollisiondetection.net - the blog

Com classe, herança, diagramas e tudo mais o.O

DeTToX

programming Articles from ArticleSnatch Article Directory

www.swprog.com - Recensioni

www.swprog.com - Script

www.swprog.com - HowTo

www.swprog.com - Guide

www.swprog.com - Articoli

Title of this RSS flow

random selection from this sub-category:
Dotnet Related

衰锅'S Blog

programming Articles from ArticleSnatch Article Directory

www.swprog.com - Articoli

DeTToX

%w(Akita On Rails) * 2.0 - Home

Title of this RSS flow

www.swprog.com - Guide

Slashdot: Developers

IBProvider - новости, релизы, документация

Rss Directory > Programming > Article > Title of this RSS flow


Description of RSS
 
  Thu, 27 Sep 2007 01:19:14 +0200
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 ...
  Thu, 05 Jul 2007 05:31:44 +0200
  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...
  Thu, 05 Jul 2007 05:15:27 +0200
  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.  
  Thu, 05 Jul 2007 05:10:35 +0200
  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...
  Thu, 05 Jul 2007 05:09:56 +0200
  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.
  Thu, 05 Jul 2007 05:09:17 +0200
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:
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...
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.  
  Tue, 03 Jul 2007 15:07:53 +0200
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...
  Wed, 27 Jun 2007 12:03:14 +0200
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 ...

Disclaimer|Rss Directory|Try a Feed|Suggest a Feed|F-A-Q|Partners
Links: Référencement internet | Annuaire Webmaster  | ubuntu/debian tips
Comparateur de Prix | Logos, Sonneries, Jeux Java | Sonneries pour portables | Ringtones and logos for mobile phone | Accéssoires pour téléphone portable | Sonneries Et Logos
© copyright feeds2read.net 2005-2008