By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,384 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,384 IT Pros & Developers. It's quick & easy.

OdbcDataAdapter Insert Command

P: 5
Hi,
I am using OdbcDataAdapter to insert data to postgreeSQL..
Everything’s seems to be fine, but nothing is inserting in the database. Andy Idea??
Thanks in advance


Expand|Select|Wrap|Line Numbers
  1. string selectCommand = "SELECT ROAD_ID, PONTOS  FROM geom";
  2. OdbcDataAdapter adapter = new OdbcDataAdapter(selectCommand, connection);
  3. adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  4. try
  5.    {
  6.       adapter.InsertCommand = new OdbcCommand("INSERT INTO geom (ROAD_ID,PONTOS) " + "VALUES (4,GeomFromText('POINT(2000 243118 191108)',-1));");
......
Mar 14 '08 #1
Share this Question
Share on Google+
2 Replies


debasisdas
Expert 5K+
P: 8,127
Are you getting any error from the code ?

What is GeomFromText('POINT in your code ?
Mar 18 '08 #2

P: 5
Are you getting any error from the code ?
What is GeomFromText('POINT in your code ?
No i don´t receive any error.
GeomFromText is used to convert a Spatial reference system, version of a geometry into a PostGIS geometry.
Mar 28 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.