Hi all,
I am using NPGSQL to connect to postgres server.I am getting
exception at the first statement in the try block.
string not recognised as a vaild date time
NpgsqlCommand command3 = new NpgsqlCommand(" SELECT * FROM table1WHERE \"col2\" = :val3", conn1);
command3.Parame ters.Add(new NpgsqlParameter ("val3", DbType.String)) ;
command3.Parame ters[0].Value ="werqwr";
try
{
NpgsqlDataReade r dr = command3.Execut eReader();
while (dr.Read())
{
for (int i = 0; i < dr.FieldCount; i++)
{
Console.Write(" {0} \t", dr[i]);
}
Console.WriteLi ne();
}
}
cheers,
SAM
I am using NPGSQL to connect to postgres server.I am getting
exception at the first statement in the try block.
string not recognised as a vaild date time
NpgsqlCommand command3 = new NpgsqlCommand(" SELECT * FROM table1WHERE \"col2\" = :val3", conn1);
command3.Parame ters.Add(new NpgsqlParameter ("val3", DbType.String)) ;
command3.Parame ters[0].Value ="werqwr";
try
{
NpgsqlDataReade r dr = command3.Execut eReader();
while (dr.Read())
{
for (int i = 0; i < dr.FieldCount; i++)
{
Console.Write(" {0} \t", dr[i]);
}
Console.WriteLi ne();
}
}
cheers,
SAM
Comment