postgresql - Backend sent unrecognized response type: u Error with Postgres 9.3 and npgsql -


i upgraded server yesterday postgres 9.1 9.3 , since i've been getting error: backend sent unrecognized response type: u

i'm using npgsql connect application server.

i remember used error while , haven't seen in while.

a full line log is:

backend sent unrecognized response type: u insert stockcodes_rating (item_code,rating,price_range,user_id,timestamp_of_rating) values ('10245684','5','reasonable','10832',now()) 

my code procedure is:

public function insertrating(byval stockcode string, byval rating integer, byval pricerange string, byval userid string) string      dim objdbwrite dlnpgsql     objdbwrite = new dlnpgsql("postgreconnectionstringwrite", configurationmanager.appsettings("currentdatabase"))      tmpsql = "insert stockcodes_rating (item_code,rating,price_range,user_id,timestamp_of_rating) values " & _             "('" & stockcode.toupper & "','" & rating & "','" & pricerange & "','" & userid & "',now())"     try         objdbwrite.executequery(tmpsql)     catch ex exception         objdbwrite.closeconnection()         return ex.message             objdbwrite.closeconnection()     end try      return "success"  end function 

my code dlnpgsqlclass is:

imports npgsql

public class dlnpgsql dim _sqlconnection npgsqlconnection dim _sqlcommand npgsqlcommand dim _sqldataadapter npgsqldataadapter dim _dataset dataset

public sub new()     on error goto errz     _sqlconnection = new npgsqlconnection(configurationmanager.connectionstrings("postgreremoteconnectionstring").connectionstring)      exit sub  end sub  public sub new(byval whichconnectionstring string)     on error goto errz     _sqlconnection = new npgsqlconnection(configurationmanager.connectionstrings(whichconnectionstring).connectionstring)      exit sub end sub  public sub new(byval whichconnectionstring string, byval whichdb string)     on error goto errz     _sqlconnection = new npgsqlconnection(configurationmanager.connectionstrings(whichconnectionstring).connectionstring & "database=" & whichdb & ";")      exit sub end sub  public function openconnection() npgsqlconnection      try         if _sqlconnection.state = connectionstate.closed             _sqlconnection.open()         end if     catch ex exception     end try     return _sqlconnection end function  public sub closeconnection()      try         if _sqlconnection.state = connectionstate.open             _sqlconnection.close()         end if     catch ex exception     end try  end sub  public function getdataset(byval strquery string) dataset      'npgsqleventlog.level = loglevel.normal     'npgsqleventlog.logname = ("c:\npgsql.log")     'npgsqleventlog.echomessages = true      _dataset = new dataset      try         _sqldataadapter = new npgsqldataadapter(strquery, openconnection)         _sqldataadapter.fill(_dataset)     catch ex exception     end try      return _dataset  end function  public function releasedataset(byref ds dataset) boolean     try         ds.clear()         ds.dispose()     catch ex exception     end try     return true end function  public function executequery(byval strquery string) string      'npgsqleventlog.level = loglevel.normal     'npgsqleventlog.logname = ("c:\npgsql.log")     'npgsqleventlog.echomessages = true     dim recordsreturned string = ""      try         _sqlcommand = new npgsqlcommand(strquery, openconnection)         recordsreturned = _sqlcommand.executenonquery()     catch ex exception         return ""     end try      return recordsreturned  end function  public function isr(byval tmpds dataset, optional byval tablename integer = 0) boolean     try         if tmpds.tables.count > 0             if tmpds.tables(0).rows.count > 0                 isr = true             else                 isr = false             end if         end if     catch ex exception         isr = false     end try end function 

end class

what version of npgsql using? need upgrade 2.0.14.3.

better yet, try out 2.1.0-beta1 quite stable , released.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -