Migrate from Access to SQL Server

Results 1 to 3 of 3

Thread: Migrate from Access to SQL Server

  1. #1
    Join Date
    Dec 1969

    Default Migrate from Access to SQL Server

    About a month ago, we migrated our Access databases to SQL Server 7.0. The migration went fine. <BR><BR>Now, the problem is, I have a hit counting table that records the user&#039s name and address for each hit. The user name is added to the database through a session variable in the global.asa. This worked wonderfully in Access, now ever since we migrated to SQL Server, the username is not being brought into the database correctly. All of the other fields are correct. I can only assume that it has to do with the migration, because it is around that time that I got all Null values in the user field (I do hit counts once a month, so I&#039m just noticing now. Wonderful). The user field was a Text datatype in Access, which migrated to a nvarchar datatype in SQL Server. <BR><BR>Here is the code in the global.asa. I would really appreciate any help as I am at a total loss as to where to even start to troubleshoot!<BR><BR><BR>&#060;% <BR>&#039database connection<BR>&#039define recordset<BR>dim strSQL<BR>strSQL = "SELECT ID, HitDate, Address, UserName From HitCounts"<BR>RS.Open strSQL, dbconn 3,3<BR><BR>RS.AddNew<BR>RS("HitDate") = Date<BR>RS("Address") = Request.ServerVariables("REMOTE_ADDR")<BR>&#039**l ine not being entered into database<BR>RS("UserName") = session("ID")<BR>RS.Update<BR><BR>Thanks in advance!!

  2. #2
    Join Date
    Dec 1969

    Default RE: Migrate from Access to SQL Server

    Typically if there is a problem with data typesit will crash the system and give you a SQL error, not just ignore it. (i.e. if you try to put a character in a numeric field you should get an error and ther record will not be updated.")<BR><BR>This leads me to believe that there is nothing is session("ID"). The first thing I would do is put a response.write(session("ID")) and see if anything is coming in. My guess is that it will be empty. Hopefully this will tell you where to look.<BR><BR>Good luck

  3. #3
    Tommy411 Guest

    Default RE: Migrate from Access to SQL Server

    It looks fine. Print the session("ID") out and see what it looks like. cause are u sure nothing else was modified? Another idea is, i don&#039t know if this would work but typcast the session("ID") to text.<BR><BR>Good luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts