[thelist] Converting VBScript from Access to SQL

Jeremy Weiss jweiss03 at comcast.net
Wed Nov 20 12:37:00 CST 2002


I checked the primary key like Eric said and sure enough there wasn't
one, so I added it.  Unfortunately it still didn't solve the problem.

When I fill out the form it adds the member information into agent_tbl
and assigns the primary key 'id' and then adds the zip codes purchased
into zip_tbl and adds a value to the agent_tbl_id field (which it
didn't do until I followed Wade's advice last night).

The problem is, the value of id in agent_tbl and the value of
agent_tbl_id in zip_tbl need to be the same.  Right now it's assigning
an appropriate value to the id field (i.e. 751) but the value it puts
in the agent_tbl_id field is way off (i.e. 4).

Wade, everything worked fine in Access, the reason why I'm switching
to SQL is that I've been reading up on the limitations of Access and
looked at our traffic flow and thought it was about time to upgrade.

Any other ideas?  How about a few (beginner level) questions?  How do
I check relationships in a SQL database?  Would the upsizing wizard
keep existing relationships in tact?


-jeremy


----- Original Message -----
From: Wade Armstrong <wade_lists at runstrong.com>
Date: Wednesday, November 20, 2002 11:48 am
Subject: Re: [thelist] Converting VBScript from Access to SQL

> on 11/19/02 8:25 PM, Jeremy Weiss at jweiss03 at comcast.net wrote:
>
> > 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.
> As Eric suggested, make sure that you tables are set up as you
expect,
> particularly that your id is, in fact, of a numeric datatype (I've
> seenupsizing change numeric fields into varchars), set to be
> IDENTITY(1,1) (or
> whatever you want your starting number and steps to be), and set
> as a
> primary key. IF all those things are true, THEN you should ALWAYS
> get the
> right result by SELECTing @@IDENTITY.
>
> Did you get the expected result using the recordset method you'd
> earlierused with Access? If not, try.
>
> Wade
>
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>




More information about the thelist mailing list