Hi
I am attempting to insert into a remote PostgreSqL database as a novice.
I am using C# 2008 Express, on Windows 7.
I have made a connection through a connection string which works well.
So far I have this code placed after the connection code.
string insertString = @"Insert into p_id.image (logothe_geom, description, text_)"
+ " select st_centroid (graphics.utilities_dgm.the_geom), ('Logo'), ('PDW')"
+ " From graphics.utilities_dgm"
+ " Where graphics.utilities_dgm.utilities_description = 'Base'";
SqlCommand command = new SqlCommand(insertString);
command.ExecuteNonQuery();
This gave me a "Conection property has not been initialized" error.
After a search I attempted to initialize the connection property by adding connectionString to the SQLCommand -
SqlCommand command = new SqlCommand(insertString, connectionString);
But this gives me an error about overloaded method match and invalid arguments.
Any help would be appreciated.
Bob