I am trying to pull data from a PostgreSQL 8.3 database. I can successfully pull data from the tables and write them into my SQL server tables. My problem is that I don't want to just sync everything. I want to get the max(id) from my local SQL server table, then get everything > max(id) from the postgres remote table. I used a web article create an ADO.net connection to my postgres db. However I can't find a place in the ADO.net source where I can use a variable in my where clause.
What I am doing is: SELECT * FROM tblFiles in my ADO.net editor. I would like to do something like SELECT * FROM tblFiles WHERE id > cast(? as int)
Can anybody help or does anybody have a better way of doing this? All I need to do is insert the rows that exist in the remote server to my local server.