MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old December 17th, 2003, 07:26 AM
Haekel Haekel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 40 Haekel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Difference Access - SQL Server

Hi,

i have a (probably very dumb) question:
I have an Access DB connected to an IIS via ODBC, and use ASP pages to get info to/from the DB.
My guys in IT now want to migrate the Access DB to SQL Server. Can anybody tell me what this implies in terms of
a) syntax of my ASP pages
b) syntax of my SQL statements
c) other problems I may not have thought of.

I am told it is really easy, however, I just cannot get is to work.
BTW, I have activated the "SQL Syntax" option in Access, in case that helps any.

Any comments are well appreciated!!!

Thank you.

Reply With Quote
  #2  
Old December 17th, 2003, 06:13 PM
saunan saunan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 saunan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
There are no dumb questions ... I'm going through this myself with 9 databases. Some are easy. Used the Access 2002 Upsizing Wizard to convert the DB, changed the ASP Connection String to SQL Server and voila! (I have MSDE 2000 without Enterprise Manager, so data transfer is sometimes problematic.)

About half the databases have more difficult conversion issues. The Upsizing Wizard doesn't properly create the SQL Server tables, ASP code to insert dates needs to be changed ...

What exactly are you having trouble with? Is the SQL DB created? Trouble connecting? Problems inserting data? If I can help, I will.

Reply With Quote
  #3  
Old December 18th, 2003, 05:43 AM
Haekel Haekel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 40 Haekel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Further info

Hi,

the problem I have is that my IT guys told me "no problem" when they said they want to transfer the DB.
The first problem arose when I tried to connect to the DB - the ODBC changed, so the Conn.Open wouldn´t work any more.
Also, the one time I got around that, it seemed to have a problem with my SQL strings.
The problem is not migrating the DB, that they managed rather well and I think the DB is ok. It is not big anyway.
The problems are - besides the one above:
1. Authentification: MY access DB did not have it (no need), but the SQL thingy does, and no one can tell me how to re-write the statements so that it includes User and PW.
2. Any other changes in how I handle the ODBC connection. I use the .Execute quite often, i.e. Always, actually.
3. Changes in the SQL statements.

Any help is appreciated!

If you would like code samples, let me know.

Thanks, guys, thanks.

Reply With Quote
  #4  
Old December 18th, 2003, 12:05 PM
saunan saunan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 saunan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Here's an excellent source for connection strings (you should consider using OLEDB instead of ODBC).

URL

I assume you're using SQL authentication?

ODBC with DSN:

oConn.Open "DSN=mySystemDSN;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"

ODBC without DSN:

oConn.Open "Driver={SQL Server};" & _
"Server=MyServerName;" & _
"Database=myDatabaseName;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"

If the SQL Server is on the same box as your web site, use "Server=(local);"

As far as SQL statements go, I'm still fixing my own code, so I can't offer too much advice. I do know that SQL Server handles dates differently than Access. If you're using # when inserting a date into an Access field, replace it with an apostrophe.

Access:

objCommand.CommandText = "UPDATE TableName SET DateField = #" & Request.Form("Date") & "# WHERE ID = '" & intRecordID & "'"
objCommand.Execute

SQL Server: change # to apostrophe symbol

I'm still tracking down other necessary changes in my own code...

Reply With Quote
  #5  
Old December 22nd, 2003, 08:46 AM
Haekel Haekel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 40 Haekel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Thank you

Sorry, I was buried in other work the last days....

Thanks for all your help! I am going to attack the problem tomorrow with the SQL server guy.
So far the thing still runs in Access (and runs well, so I do not hope we are solving a problem we do not really have...)


Merry Christmas and a happy new year!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Difference Access - SQL Server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway