Erro com Npgsql + ASP.NET + C#
03/02/2010
0
Saudações srs
Estou com o seguinte código
NpgsqlConnectionc conn = new NpgsqlConnection("STRING DE CONEXÃO");
conn.Open();
NpgsqlCommand command = new NpgsqlCommand(sql, conn);
Int32 rowsaffected;
//try
//{
rowsaffected = command.ExecuteNonQuery();
Console.WriteLine("Linhas incluidas ", rowsaffected);
//}
//finally
//{
conn.Close();
Com o seguinte erro... e não estou encontrando o maldito erro...
ERROR: 42601: syntax error at or near ".0"Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Npgsql.NpgsqlException: ERROR: 42601: syntax error at or near ".0"
Source Error:
Line 54: //try Line 55: //{ Line 56: rowsaffected = command.ExecuteNonQuery(); Line 57: Line 58: Console.WriteLine("Linhas incluidas ", rowsaffected);
Source File: c:\Users\Roberson\Documents\Visual Studio 2008\WebSites\Site\portal\Default.aspx.cs Line: 56
Exception Details: Npgsql.NpgsqlException: ERROR: 42601: syntax error at or near ".0"
Source Error:
Line 54: //try Line 55: //{ Line 56: rowsaffected = command.ExecuteNonQuery(); Line 57: Line 58: Console.WriteLine("Linhas incluidas ", rowsaffected);
Source File: c:\Users\Roberson\Documents\Visual Studio 2008\WebSites\Site\portal\Default.aspx.cs Line: 56
Roberson Naves
Curtir tópico
+ 0
Responder
Posts
03/02/2010
Roberson Naves
Resolvido....
Erro na query....
Grato pela oportunidade
Responder
04/02/2010
Luiz Junior
Olá ... posta o valor da variável sql para poder analisar a query
Responder
Clique aqui para fazer login e interagir na Comunidade :)