Grasshopper

algorithmic modeling for Rhino

Hello,

A week ago I was having problems connecting to a local postgres server. Eventually the problem was solved substituting the driver from "PostgreSQL" to "PostgreSQL UNICODE".

Somehow i'm still not being able to make querys, and the error message show the following:

{0}
0. System.Data.Odbc.OdbcException: ERROR [08001] connction string lacks some options
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.Odbc.OdbcConnection.Open()
at SlingshotDB.GHODBC_QUERY.SolveInstance(IGH_DataAccess DA)

Can anyone tell me what i'm missing?

The connection string I'm trying to use is:

"

Driver={PostgreSQL UNICODE}; Server=localhost; Port=5432; Uid=postgres; Pwd=passwordx; commandtimeout=20; Timeout=5"

Tks,

Pedro.

Views: 2004

Replies to This Discussion

Hello Pedro,

What kind of query are you attempting to perform?  If you are making a query to a database, you should supply a "database=yourdb" as an option in your connection string. 

You should also reference what kinds of queries are supported in PostgreSQL as they may differ slightly than those supported in MySQL or other db server.

-Nathan

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service