Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: primary key


Message #1 by "Alexander Zeitler" <alexander.zeitler@w...> on Sat, 24 Feb 2001 23:31:13 +0100
hello,



is it possible to get the primary key of a table using asp/ado and

accessing the database throug a dsn?



thanks for any help



alex



Message #2 by "Ken Schaefer" <ken@a...> on Sun, 25 Feb 2001 20:15:45 +1100
Yes.



If you're using Access, then look here;

http://www.adopenstatic.com/experiments/fastestautonumber.asp

(you'll have to use .AddNew if you want to keep the ODBC DSN, otherwise, if

you switch to OLEDB you can use @Identity)



If you're using SQL Server, then lookup @@Identity in BOL



Cheers

Ken



----- Original Message -----

From: "Alexander Zeitler" <alexander.zeitler@w...>

To: "ASP Databases" <asp_databases@p...>

Sent: Sunday, February 25, 2001 9:31 AM

Subject: [asp_databases] primary key





> hello,

>

> is it possible to get the primary key of a table using asp/ado and

> accessing the database throug a dsn?

>

> thanks for any help

>

> alex





Message #3 by "Alexander Zeitler" <alexander.zeitler@w...> on Sun, 25 Feb 2001 14:08:44 +0100
hello ken,



i think i told not correctly what i need.....:



i have 5 oder 6 databases with many tables in it.

now i want to find out, which field of each table

is the primary key - and later on, its value.

the databases can be access or sql-server.



although thanks for your help



greetings

Alex



> Yes.

> 

> If you're using Access, then look here;

> http://www.adopenstatic.com/experiments/fastestautonumber.asp

> (you'll have to use .AddNew if you want to keep the ODBC DSN, otherwise, if

> you switch to OLEDB you can use @Identity)

> 

> If you're using SQL Server, then lookup @@Identity in BOL

> 

> Cheers

> Ken

> 

> ----- Original Message -----

> From: "Alexander Zeitler" <alexander.zeitler@w...>

> To: "ASP Databases" <asp_databases@p...>

> Sent: Sunday, February 25, 2001 9:31 AM

> Subject: [asp_databases] primary key

> 

> 

> > hello,

> >

> > is it possible to get the primary key of a table using asp/ado and

> > accessing the database throug a dsn?

> >

> > thanks for any help

> >

> > alex

> 

> 

> 

> 

> ---

> Please take a moment to tell us how you are using AuthentiX, WebQuota, and

> VideoQuota

> 

> http://www.flicks.com/feedback/feed.asp

> 

> Scott Gordon

> Marketing

> Flicks Software

> www.flicks.com

>  xxx-xxx-xxxx








_______________________________________________________________________

1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de

IhrName@w..., 8MB Speicher, Verschluesselung - http://freemail.web.de






  Return to Index