Re: Query two databases with asp



DB1..School
ID - INT(data type) - 4 (length) - PKey
Parish - nvarchar - 255
School - nvarchar - 255

DB2..Users
ID - numeric(data type) - 9 (length)
FirstName - varchar - 50
LastName - varchar - 50
Address - varchar - 50
City - varchar - 25
State - varchar - 10
Zip - varchar - 10
CompanyName - varchar - 50
Username - varchar - 50 - PKey

The CompanyName field in the users table under DB2 is the ID field of DB1.


"Bob Barrows [MVP]" wrote:

let's make sure I have this straight:

DB1..School
ID numeric (precision and scale please?)
All the rest of the fields are nvarchar? What are the defined lengths?

DB2..Users
ID numeric (precision and scale please?)
firstname varchar (length?)
lastname bit ???
address int ???
city numeric???
CompanyName datetime ???

Huh???


dusty wrote:
DB1\school table
int
nvarchar

DB2\Users
numeric
varchar
bit
int
numeric
datetime


"Bob Barrows [MVP]" wrote:

dusty wrote:
I'm trying to create an asp page that will allow users to generate
search results by querying mssql databases.
I inherited these databases and did not build them. Here's the
scenario.

I have two databases: DB1 and DB2. School is a table of DB1 that
consists of the fields:
ID, Parish, School, Principal, address, city, zip, etc.

Users is a table of DB2 that consists of the following fields:
ID, firstname, lastname, address, city, CompanyName, etc.

What are the datatypes of these fields, please?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



.



Relevant Pages

  • Re: Find duplicate records where four or more fields match
    ... I see people have both a town and city but no state/province and no ... If you wanted data integrity, the table probably ought to look more like ... firstname VARCHAR NOT NULL, ... This is actually wrong because you gave us no rules for NULLs. ...
    (microsoft.public.sqlserver.programming)
  • Re: Data Type nvarchar or varchar
    ... Access with Unicode, why would you want to start changing things now? ... Do you think can i change nvarchar to varchar without impact problems? ... can switch the data types back to varchar. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: varchar and nvarchar, which one to use???
    ... > and i was confused the correct use of varchar and nvarchar. ... For a business like Amazon, the choice should be simple: ... have a customer that requires support for, say, Polish and Swedish the same ...
    (microsoft.public.sqlserver.programming)
  • varchar and nvarchar, which one to use???
    ... and i was confused the correct use of varchar and nvarchar. ... I've been using varchar in the past, but i noticed all the code samples ... what's the best practice using these data types? ... nvarchar literal together with an indexed varchar column, ...
    (microsoft.public.sqlserver.programming)
  • Re: varchar and nvarchar, which one to use???
    ... If you will only deal with the normal ascii characters ... languages and must store a character that requires two bytes to store ... and i was confused the correct use of varchar and nvarchar. ... I've been using varchar in the past, but i noticed all the code samples ...
    (microsoft.public.sqlserver.programming)

Loading