Inserting data into a remote SQL 2000 database

Hi experts,

I am looking for a good reccomendation here as opposed to an answer.

I need to insert data into a remote SQL server and I am a little unsure of how fast a connection there will be between the application and the SQL server. Is there any sort of reccomended / proven means to insert data in a situation like this where the SQL server is not installed in the local environment.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Using JDBC for the programmer is not visible (he/she doesn't care of this) where the Database is.
For increasing speed you can use prepared statement. In this manner the instruction is precompiled. It is good if you are doing many similar query differ only about the data inserted and not with the structure.
So, download and use the JDBC driver for your particular SQLServer and use prepared statement.

Hope this could help you.
Bye Giant.
Absolutely JDBC removes the complexity of connecting to a database, the speed of your query can be optimized in many ways, but the reall problem is the architecture of your application/database.If you are unsure of the type and speed of the connection that your application has to the remote database. And also the security access to the database then you will have to work around it some how.

I'd suggest that you write a servlet that will be running in the same lan/wan space as the database and  have this intermediate layer connect to that database for you. Yes there is more overhead associated with having another layer to your app; but you may not have any luck in convincing a DBA to open up their database for remote access.

If you are not in a secure LAN/WAN network of some sort, I would strongly recommend that you not open up the database for access over the internet.

>I'd suggest that you write a servlet
In this manner you must have an ApplicationServer/WebServer.
If the program not run on the Internet it's sufficient use the normal and basic JDBC connection.
You could possibly increase your connection timeout to cater for a slow network response. Keep in mind that the database may allow only a certain amount of connections at any one point in time which could delay threads from receiving available connections.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sorry for not help you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.