473,396 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

OdbcDataAdapter Insert Command

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
2 5596
debasisdas
8,127 Expert 4TB
Are you getting any error from the code ?

What is GeomFromText('POINT in your code ?
Mar 18 '08 #2
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

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

Similar topics

8
by: 73blazer | last post by:
Hello, I'm looking for a way to make some of my insert templates more readable by placing comments in between the values. I cannot seem to find a way to do this with DB2, is there a way? I'm...
3
by: alexmaster_2004 | last post by:
hi i have made an application using C# that access sql2000. this application is just used to insert data to the database. i use something like this in my code: // string colmnA = TextBox1.Text;...
3
by: jm | last post by:
I do not want to use the datagrid, datalist, etc. I want to retrieve simply the value from the query. I know the sql is returning data, because, if I use a grid, I can populate it. I have...
3
by: Rob Dob | last post by:
SQLDataAdapter. ODBCDataAdapter etc. Have they disappeared from .Net 2.0 Webforms? can somone please elaborate as I cannot seem to find support for these..
1
by: sbreytberg | last post by:
Hi all, I am a newbie at dotnet. Been going through someone else's code and here's a problem: I am loading a csv file into the database. When there's more than one record, it works fine, but...
1
by: paul.d.mcswain | last post by:
This has probably already been answered, but it didn't show up when I did a search. I need to be able to perform a batch insert using the ODBC ADO.NET objects (OdbcCommand, OdbcDataAdapter,...
0
by: roundcrisis | last post by:
hiL i have teh following code: string query = "select * FROM users"; OdbcCommand command = new OdbcCommand(query, conn); OdbcDataAdapter da = new OdbcDataAdapter(); da.SelectCommand = command;...
5
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration:...
7
by: anu b | last post by:
Hi I need to use Clr trigger for insert command My code is as below I am using SQL server 2005 and VS 2008.... but after running this code i didnt get the result as i expexted it shows the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.