Hi,
I am using c# code to connet with postgres.
I have posted bit and pieces of the code
NpgsqlCommand command1 = new NpgsqlCommand(" INSERT INTO test(col1,col2) VALUES (:val1,:val2)", conn1);
// Now add the parameter to the parameter collection of the command specifying its type.
command1.Parame ters.Add(new NpgsqlParameter ("va1", DbType.Date));
command1.Parame ters.Add(new NpgsqlParameter ("val2", DbType.Time));
command1.Parame ters[0].Value = CurrTime.Date;
command1.Parame ters[1].Value = CurrTime.TimeOf Day;
command1.Execut eNonQuery();
When I execute the query, I am getting the error
unexpected EOF on client connection
could not receive data from client: No connection could be made because the target machine actively refused it.
unexpected EOF on client connection
If I insert only the date.The query is getting exectuted
Cheers,
Sam
I am using c# code to connet with postgres.
I have posted bit and pieces of the code
NpgsqlCommand command1 = new NpgsqlCommand(" INSERT INTO test(col1,col2) VALUES (:val1,:val2)", conn1);
// Now add the parameter to the parameter collection of the command specifying its type.
command1.Parame ters.Add(new NpgsqlParameter ("va1", DbType.Date));
command1.Parame ters.Add(new NpgsqlParameter ("val2", DbType.Time));
command1.Parame ters[0].Value = CurrTime.Date;
command1.Parame ters[1].Value = CurrTime.TimeOf Day;
command1.Execut eNonQuery();
When I execute the query, I am getting the error
unexpected EOF on client connection
could not receive data from client: No connection could be made because the target machine actively refused it.
unexpected EOF on client connection
If I insert only the date.The query is getting exectuted
Cheers,
Sam
Comment