Advertisement
Guest User

Untitled

a guest
Nov 17th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Npgsql;
  7.  
  8. namespace polcarDataWorker
  9. {
  10.     class sqlHelper
  11.     {
  12.         static string connectionString = "Host=10.1.10.155;Username=mvluser;Password=password123;Database=mvl_dump";
  13.  
  14.         public static void populateDatabase()
  15.         {
  16.             using (var connection = new NpgsqlConnection(connectionString))
  17.             {
  18.                 connection.Open();
  19.  
  20.                 using (var cmd = new Npgsql.NpgsqlCommand())
  21.                 {
  22.  
  23.                     cmd.CommandText = "COPY mvl(ktype,make,model,variant,bodystyle,type,year,engine,additionsupdate) FROM STDIN;";
  24.                    
  25.                     for (int a = 0; a < mvlLoader.listOfMvlItems.Count; a++)
  26.                     {
  27.  
  28.                     }
  29.                 }
  30.             }
  31.         }
  32.  
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement