Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
zirocool
Starting Member
3 Posts |
Posted - 2008-09-11 : 06:56:27
|
Hello all,this is my first post here in the forum so forgive me if this thread is not in the correct category.I have a Web-Application that works with Access as the DB and developed in ASP.After sometime, I took the job to convert the Access DB into a SQL server 2005 DB.I used the Microsoft's SSMA which was almost perfect regarding to the tables conversion.The problem was that all the queries are built-in on the ASP pages.(There is no stored queries / sp in the DB).I used your "Convert Microsoft Access (JET SQL) to SQL Server (T-SQL) Cheatsheet" article as a guideline and started converting some of the queries on the ASP files.So far, everything sounds good.The problem is that I have little more than 500 ASP files and converting all the queries can take ages!so I had an idea - Create a function that will take the complete JET-SQL query and dynamically (on runtime) convert it to a normal T-SQL query and then pass the new SQL query to the RecordSet.Before I'm starting to be a RegEx junky for the next (who knows) weeks :) I wanted to know if there is another solution that you're aware of.Thank you |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2008-09-11 : 11:00:14
|
So you'd rather suffer from performance and administrative issues for the life of the application than fix the problem correctly right now?Boycotted Beijing Olympics 2008 |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2008-09-11 : 12:28:54
|
As blindman says, if you write code to do this, go ahead and write it and use it to convert all of your SQL at once. And if you have dynamically created SQL strings all throughout your ASP code, trust me: It may not be fun, but once you clean it all up and convert it to T-SQL -- preferably as stored procedure calls -- EVERYTHING becomes shorter, easier, clearer, more efficient, and so on.You'll probably find that you can replace 200 spots that dynamically create SQL with 20 stored procedures. And once you do that, everything becomes much easier to maintain and your SQL code is all in one place and not dynamically generated. I am guessing you probably have tons of SQL Injection possibilites to worry about in your existing code as well ...- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2008-09-11 : 13:20:03
|
quote: Originally posted by jsmith8858 I am guessing you probably have tons of SQL Injection possibilites to worry about in your existing code as well ...
He could post his website URL and we could check for him. Boycotted Beijing Olympics 2008 |
 |
|
kdnichols
Posting Yak Master
232 Posts |
Posted - 2008-09-15 : 13:53:50
|
Blindman, I take that to be a very, very evil grin??Hopefully he got it fixed but I caught your wicked sense of humor. lol |
 |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2008-09-16 : 11:10:26
|
quote: Originally posted by kdnichols Blindman, I take that to be a very, very evil grin??Hopefully he got it fixed but I caught your wicked sense of humor. lol
You'd be surprised how many don't, but I've never let that stop me.Boycotted Beijing Olympics 2008 |
 |
|
|
|
|
|
|