Click here to Skip to main content
15,895,084 members
Home / Discussions / Database
   

Database

 
AnswerRe: Is having an error handler in every single stored procedure excessive? Pin
emunews20-Jan-09 5:40
emunews20-Jan-09 5:40 
QuestionRead Output parameter with ExecuteReader in DAAB Pin
Meysam Mahfouzi24-Nov-08 22:57
Meysam Mahfouzi24-Nov-08 22:57 
AnswerRe: Read Output parameter with ExecuteReader in DAAB Pin
Ashfield25-Nov-08 0:50
Ashfield25-Nov-08 0:50 
QuestionDoes anyone know if it is possible to supply multiple queries and tables to exp - so that the result is a single export file ? Pin
by824-Nov-08 20:14
by824-Nov-08 20:14 
AnswerRe: Does anyone know if it is possible to supply multiple queries and tables to exp - so that the result is a single export file ? Pin
Wendelius27-Nov-08 4:09
mentorWendelius27-Nov-08 4:09 
QuestionBroken replication Pin
thaarM24-Nov-08 18:46
thaarM24-Nov-08 18:46 
Questionthanks Pin
Abhilash124-Nov-08 17:54
Abhilash124-Nov-08 17:54 
Questionhow to import excel sheet data to postgresql database Pin
Ranjt kumar24-Nov-08 8:56
Ranjt kumar24-Nov-08 8:56 
Hi all,
i have arequirement to import excel sheet to postgresql using C#.

i wrote a code:
try
{
connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data Source=" + txtfilename.Text + ";" + "Extended Properties=Excel 8.0;");

mycommand = new OleDbDataAdapter(@"select * from [Ranjit$]", connection);
mydataset = new DataSet();
mycommand.Fill(mydataset, "ExcelInfo");
try
{
dataGridView1.DataSource = mydataset.Tables["ExcelInfo"].DefaultView;
}
catch (Exception ex)
{
//System.Diagnostics.Debug.WriteLine(ex.GetBaseException().ToString());
//MessageBox.Show(ex.GetBaseException().ToString());
throw new Exception(ex.Message);

}
So mydataset is displaying data in datagridview. this is working fine

No i have to send data to postgresql database
For that i wrote code

NpgsqlConnection strconn = new NpgsqlConnection(@"server=localhost;user id=postgres;password=thinksoft10@;database=Test;SyncNotification=true ");
strconn.Open();
NpgsqlCommand cmd = new NpgsqlCommand("COPY \"Test\" FROM STDIN", strconn);
NpgsqlCopyIn cin = new NpgsqlCopyIn(cmd, strconn);
cin.start();

but this is copying files to the database.

So please tell me how to copy that information in the postgresql database.

in my application i am able to show the excel sheet data in datagrid.

but i am not aable to send the excel sheet data to postgresql Test database test table.

Any help is appreciated!!!

thanks in anticipation
Ranjit.balu
AnswerCross-post Pin
Wendelius24-Nov-08 9:26
mentorWendelius24-Nov-08 9:26 
QuestionAutogenerated / Numeric Primary Key Pin
CH SRINIW8Z24-Nov-08 4:39
CH SRINIW8Z24-Nov-08 4:39 
AnswerRe: Autogenerated / Numeric Primary Key Pin
Wendelius24-Nov-08 5:17
mentorWendelius24-Nov-08 5:17 
AnswerRe: Autogenerated / Numeric Primary Key Pin
Ashfield24-Nov-08 5:18
Ashfield24-Nov-08 5:18 
GeneralRe: Autogenerated / Numeric Primary Key Pin
Ben Fair25-Nov-08 4:01
Ben Fair25-Nov-08 4:01 
GeneralRe: Autogenerated / Numeric Primary Key Pin
Ashfield25-Nov-08 9:21
Ashfield25-Nov-08 9:21 
QuestionHow to Solve Dead Lock problem in Sql Server 2005 Question Pin
pdnet24-Nov-08 1:37
pdnet24-Nov-08 1:37 
AnswerRe: How to Solve Dead Lock problem in Sql Server 2005 Question Pin
Wendelius24-Nov-08 2:01
mentorWendelius24-Nov-08 2:01 
GeneralRe: How to Solve Dead Lock problem in Sql Server 2005 Question Pin
CH SRINIW8Z24-Nov-08 4:48
CH SRINIW8Z24-Nov-08 4:48 
GeneralRe: How to Solve Dead Lock problem in Sql Server 2005 Question Pin
Wendelius24-Nov-08 5:28
mentorWendelius24-Nov-08 5:28 
GeneralRe: How to Solve Dead Lock problem in Sql Server 2005 Question Pin
Jon_Boy24-Nov-08 8:44
Jon_Boy24-Nov-08 8:44 
GeneralRe: How to Solve Dead Lock problem in Sql Server 2005 Question Pin
Wendelius24-Nov-08 9:36
mentorWendelius24-Nov-08 9:36 
QuestionNew Values in database Pin
Syed Shahid Hussain24-Nov-08 1:28
Syed Shahid Hussain24-Nov-08 1:28 
AnswerRe: New Values in database Pin
Paddy Boyd24-Nov-08 1:55
Paddy Boyd24-Nov-08 1:55 
AnswerRe: New Values in database Pin
Ben Fair24-Nov-08 3:43
Ben Fair24-Nov-08 3:43 
QuestionSql database from local system to Web hosting server Pin
pavanip23-Nov-08 20:10
pavanip23-Nov-08 20:10 
AnswerRe: Sql database from local system to Web hosting server Pin
Wendelius24-Nov-08 2:11
mentorWendelius24-Nov-08 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.