[thelist] Converting VBScript from Access to SQL

Jeremy Weiss jweiss03 at comcast.net
Tue Nov 19 22:27:01 CST 2002


Wade,

I've changed the connection string to an SQL DNS one and now it's adding the
an id, but it's the wrong id.  With respect to those on digest I've posted
the code at http://whatsmyhomevalue.com/testnew/confirmation.txt (the actual
page is .asp of course)

All the variables are passed from a form at
http://whatsmyhomevalue.com/testnew/membership_form.htm


Eric,

I've got the Option Explicit on at the top and there's no mention of On
Error Resume Next.  Oh, and zip is defined on the previous page, I cut a lot
out to save bandwidth.


-jeremy

:SQL Server doesn't inherently require "SELECT @@IDENTITY" - it's
:only a new,
:more efficient way to do things. Thanks to ADO, all you have to do to make
:the same code work with SQL Server is change the connection string to to:
:(should all be on one line)
:Driver={SQL
:Server};Server=XX.XX.XX.XX;Database=database;UID=username;PWD=password
:
:Then your code should work as it is.
:
:Once you've got that working, come back and we can go over doing
:inserts and
:updates the quick way, with straight SQL, instead of using Recordsets.
:
:Wade
:


:1. Make sure you have Option Explicit on at the top, and have dimmed all
:variables.
:
:2. Make sure you DO NOT have On Error Resume Next up above somewhere.
:
:3. Step through it, response.writing the variables out at each step, so you
:know where the error is.
:
:For example, Response.Write the "zip" variable to make sure you actually
:have something to Split, and then loop through. If its blank, then you have
:no loop, and no update.
:
:4. Actually, where is "zip" defined? Am I missing something?
:
:- Eric
:





More information about the thelist mailing list