Friday, 18 October 2013

Create An Ftp Server On Your Pc With Serv-u


Create An Ftp Server On Your Pc With Serv-u



Requirements:
Serv-U
No-IP.com Website

Quote:
Step 1. Getting a static IP address.
Get a static address for your FTP server. You will want to do this as opposed to using your IP address for several reasons. First, it’s easier keeping up-to-date. Imagine having to change all of your setting every time your IP changed. With No-IP, the No-IP service runs in background on your computer and updates your current IP address with your FTP server’s URL (for example, you get ftp://rkchoolie.serveftp.com). Second reason, you don’t want your IP address posted out there for everyone to see.

1. Go to www.No-IP.com to create a new user account.
2. Fill in the information that is required and the click Register button.
3. Your account has now been created and your account password has been emailed to you.
4. Check your email mailbox and wait for the mail that contains your password
5. Go back to www.No-IP.com and type your email address and password to login to your account.
6. Once in your account, click on Add a host in the left menu
7. Type in the Hostname you want (example: rkchoolie) and pick a Domain from the list (example: ftpserve.com)
8. Check Allow Wildcards and click the Submit button
9. You now have your static address (example: rkchoolie.serveftp.com)
10. Click on your OS link in the Dyn-Update Client in the bottom right menu and follow links to download the client
11. Once downloaded, install the software and type in your email address and password when asked.
12. Finally tick the checkbox near your static address.

You now have a static web address .


Quote:
Step 2. Installing and setting the FTP server
1. Install Serv-U 4.0.
2. Start Serv-U and use the wizard to setup your ftp.
3. Click next until you're asked for an IP address, leave it blank and then click next.

Wednesday, 4 September 2013

Bulk Insert DataTable To SQL Database


This DLL provide method to insert multiple data record in bulk.

You can insert DataTable object into SQL Table. The Only convention required is, the DataTable must have the same number of columns and of same datatype as in SQL Table.

You need to just keep the order of columns same as that of SQL Table while columns name can be anything i.e. You can keep the name of columns in DataTable as par your convenience.
How to use
You must have add this DLL to your project first. Then, create an instance of it for example:
Insert srt = new Insert();
Their after, you need to prepare your data in the form of DataTable, example:
DataTable dt = new DataTable();
dt.Columns.Add("id", typeof(string));
dt.Columns.Add("pwd", typeof(string));
dt.Columns.Add("email", typeof(string));
dt.Columns.Add("code", typeof(string));

DataRow dr = dt.NewRow();
dr["id"] = "yuor id";
dr["pwd"] = "your password;
dr["email"] = "your email;
dr["code"] = your code";
dt.Rows.Add(dr);

DataRow dr1 = dt.NewRow();
dr1["id"] = "yuor id1";
dr1["pwd"] = "your password1;
dr1["email"] = "your email1;
dr1["code"] = your code1";
dt.Rows.Add(dr1);

DataRow dr2 = dt.NewRow();
dr2["id"] = "yuor id2";
dr2["pwd"] = "your password2;
dr2["email"] = "your email2;
dr2["code"] = your code2";
dt.Rows.Add(dr2);
Now we are inthe condition to insert our date into SQL Table with the help of "BulkInsert" DLL.
To insert Data, your code should look like this:
srt.BulkInsert(string Destination_Table_Name, DataTable Your_DataTable, string ConnectionString);
Now have look on code at all together
Insert srt = new Insert();
DataTable dt = new DataTable();
dt.Columns.Add("id", typeof(string));
dt.Columns.Add("pwd", typeof(string));
dt.Columns.Add("email", typeof(string));
dt.Columns.Add("code", typeof(string));

DataRow dr = dt.NewRow();
dr["id"] = "yuor id";
dr["pwd"] = "your password;
dr["email"] = "your email;
dr["code"] = your code";
dt.Rows.Add(dr);

DataRow dr1 = dt.NewRow();
dr1["id"] = "yuor id1";
dr1["pwd"] = "your password1;
dr1["email"] = "your email1;
dr1["code"] = your code1";
dt.Rows.Add(dr1);

DataRow dr2 = dt.NewRow();
dr2["id"] = "yuor id2";
dr2["pwd"] = "your password2;
dr2["email"] = "your email2;
dr2["code"] = your code2";
dt.Rows.Add(dr2);
srt.BulkInsert("tableName", dt, ConnectionString);