Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Microsoft OLE DB Provider for ODBC Drivers error '80040e2f'


Message #1 by "raind ray" <raind@m...> on Fri, 16 Aug 2002 11:01:48
I alwasy have this msg whenever I encountered error "Microsoft OLE DB 
Provider for ODBC Drivers error '80040e2f' " ..Is that I have incorrect 
META type library or else. I am using the following MetaData type library, 
<!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.5 
Library" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" VERSION="2.5"--> 
Is that correct?

My asp coding is working with Microsoft SQL and I have no idea on how to 
implement a autoincrement ID. In Access, there is a type of autoincrement 
type for variable declare but in microsoft SQL it doesn'thas so it is a 
paint for me. 

Please help..appreciate... Thank you.

/Ray
Message #2 by "Jack Dunstan" <jdunstan7@h...> on Fri, 16 Aug 2002 07:41:13 -0400
Ray, 
Here's the MS Sql Server equivalent to the autoincrement in Access:
IDENTITY [ ( seed , increment ) ]
seed -Is the value that is used for the very first row loaded into the table.
increment - Is the incremental value that is added to the identity value of the previous row that was loaded.
You must specify both the seed and increment or neither. If neither is specified, the default is (1,1).

Not sure about the your error.

Jack


----- Original Message ----- 
From: "raind ray" <raind@m...>
To: "ASP Databases" <asp_databases@p...>
Sent: Friday, August 16, 2002 11:01 AM
Subject: [asp_databases] Microsoft OLE DB Provider for ODBC Drivers error '80040e2f'


> I alwasy have this msg whenever I encountered error "Microsoft OLE DB 
> Provider for ODBC Drivers error '80040e2f' " ..Is that I have incorrect 
> META type library or else. I am using the following MetaData type library, 
> <!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.5 
> Library" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" VERSION="2.5"--> 
> Is that correct?
> 
> My asp coding is working with Microsoft SQL and I have no idea on how to 
> implement a autoincrement ID. In Access, there is a type of autoincrement 
> type for variable declare but in microsoft SQL it doesn'thas so it is a 
> paint for me. 
> 
> Please help..appreciate... Thank you.
> 
> /Ray
> 

Message #3 by "raind ray" <raind@m...> on Fri, 16 Aug 2002 22:58:26
Jack,

It's interesting to hear that you got idea on the autoincrement stuff. 
But, where do I use the IDENTITY [ (seed, increment ) ]? Please show 
precisely! Is it in asp coding or SQL itself. Thank you for your reply.

/Ray

> Ray, 
Here's the MS Sql Server equivalent to the autoincrement in Access:
IDENTITY [ ( seed , increment ) ]
seed -Is the value that is used for the very first row loaded into the 
table.
increment - Is the incremental value that is added to the identity value 
of the previous row that was loaded.
You must specify both the seed and increment or neither. If neither is 
specified, the default is (1,1).

Not sure about the your error.

Jack


----- Original Message ----- 
From: "raind ray" <raind@m...>
To: "ASP Databases" <asp_databases@p...>
Sent: Friday, August 16, 2002 11:01 AM
Subject: [asp_databases] Microsoft OLE DB Provider for ODBC Drivers 
error '80040e2f'


> I alwasy have this msg whenever I encountered error "Microsoft OLE DB 
> Provider for ODBC Drivers error '80040e2f' " ..Is that I have incorrect 
> META type library or else. I am using the following MetaData type 
library, 
> <!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.5 
> Library" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" VERSION="2.5"--> 
> Is that correct?
> 
> My asp coding is working with Microsoft SQL and I have no idea on how to 
> implement a autoincrement ID. In Access, there is a type of 
autoincrement 
> type for variable declare but in microsoft SQL it doesn'thas so it is a 
> paint for me. 
> 
> Please help..appreciate... Thank you.
> 
> /Ray
> 

Message #4 by "Jack Dunstan" <jdunstan7@h...> on Fri, 16 Aug 2002 18:21:31 -0400
Hi Ray,

The IDENTITY is what you would set in the Sql Server table for the field you
wish to "autoincrement".  So your typical "inserts" into the table won't
include this field.  Here's a quick little example, that makes the MemberId
an INT and an IDENTITY field (like autoincrement in Access), and it start at
1 with an autoincrement of 1 (something much easier to set up than with
Access),  then the ALTER Table makes the MemberID also the primary key.  You
can check on all this by searching BOL for IDENTITY.

Also if you already have your table created, Enterprise Manager gives a sort
of simpler graphical interface to allow you to modify your tables also.  Let
me know if you need any help.

Jack

CREATE TABLE dbo.Member
(
  MemberId INT IDENTITY (1, 1) NOT NULL,
  MemberName NVARCHAR (50) NOT NULL,
  MemberPhone NVARCHAR (20) NULL,
  MemberStartDate DATETIME NOT NULL DEFAULT (GETDATE()),
  MemberStatus NVARCHAR(20)NULL,
)

ALTER TABLE dbo.Member ADD
  CONSTRAINT PK_Member PRIMARY KEY CLUSTERED (MemberID)


----- Original Message -----
From: "raind ray" <raind@m...>
To: "ASP Databases" <asp_databases@p...>
Sent: Friday, August 16, 2002 10:58 PM
Subject: [asp_databases] Re: Microsoft OLE DB Provider for ODBC Drivers
error '80040e2f'


> Jack,
>
> It's interesting to hear that you got idea on the autoincrement stuff.
> But, where do I use the IDENTITY [ (seed, increment ) ]? Please show
> precisely! Is it in asp coding or SQL itself. Thank you for your reply.
>
> /Ray
>
> > Ray,
> Here's the MS Sql Server equivalent to the autoincrement in Access:
> IDENTITY [ ( seed , increment ) ]
> seed -Is the value that is used for the very first row loaded into the
> table.
> increment - Is the incremental value that is added to the identity value
> of the previous row that was loaded.
> You must specify both the seed and increment or neither. If neither is
> specified, the default is (1,1).
>
> Not sure about the your error.
>
> Jack
>
>
> ----- Original Message -----
> From: "raind ray" <raind@m...>
> To: "ASP Databases" <asp_databases@p...>
> Sent: Friday, August 16, 2002 11:01 AM
> Subject: [asp_databases] Microsoft OLE DB Provider for ODBC Drivers
> error '80040e2f'
>
>
> > I alwasy have this msg whenever I encountered error "Microsoft OLE DB
> > Provider for ODBC Drivers error '80040e2f' " ..Is that I have incorrect
> > META type library or else. I am using the following MetaData type
> library,
> > <!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.5
> > Library" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" VERSION="2.5"-->
> > Is that correct?
> >
> > My asp coding is working with Microsoft SQL and I have no idea on how to
> > implement a autoincrement ID. In Access, there is a type of
> autoincrement
> > type for variable declare but in microsoft SQL it doesn'thas so it is a
> > paint for me.
> >
> > Please help..appreciate... Thank you.
> >
> > /Ray
> >
>
>

  Return to Index