RE: How can I insert a new record with no values?

2001-08-07 Thread Philip Arnold - ASP

   INSERT INTO Table (Field1)
   VALUES (NULL)
 
   That should do it as long as the field can accept NULL values

 The autonumber field in my query does not accept nulls...but
 thank you for your input...

I know you've already got a solution to this, but as I commented, as long as
the field accepts NULL values, you can add a row

Your record can't just be an AutoNumber field, can it? If not, insert into
another field - the AutoNumber will take care of itself

Don't rely on Access solutions - when you upgrade to either mySQL, SQL
Server or Oracle, you'll have to hunt for all of these instances and change
them to more generic SQL or engine-specific versions (like you have now)

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

Websites for the real world

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How can I insert a new record with no values?

2001-08-07 Thread Dina Hess

Philip,

I thank you again for your suggestion, however neither of the two fields in the table 
will accept a null since one is an autonumber and one contains a default value.

Re: maintenance
There is only one instance of this code in my application, so that won't be a problem 
when I migrate to a more robust database.

Regards,
Dina
  - Original Message - 
  From: Philip Arnold - ASP 
  To: CF-Talk 
  Sent: Tuesday, August 07, 2001 4:27 AM
  Subject: RE: How can I insert a new record with no values?


 INSERT INTO Table (Field1)
 VALUES (NULL)
   
 That should do it as long as the field can accept NULL values

   The autonumber field in my query does not accept nulls...but
   thank you for your input...

  I know you've already got a solution to this, but as I commented, as long as
  the field accepts NULL values, you can add a row

  Your record can't just be an AutoNumber field, can it? If not, insert into
  another field - the AutoNumber will take care of itself

  Don't rely on Access solutions - when you upgrade to either mySQL, SQL
  Server or Oracle, you'll have to hunt for all of these instances and change
  them to more generic SQL or engine-specific versions (like you have now)

  Philip Arnold
  Director
  Certified ColdFusion Developer
  ASP Multimedia Limited
  T: +44 (0)20 8680 1133

  Websites for the real world

  **
  This email and any files transmitted with it are confidential and
  intended solely for the use of the individual or entity to whom they
  are addressed. If you have received this email in error please notify
  the system manager.
  **
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How can I insert a new record with no values?

2001-08-01 Thread Guy M. Saenger

Dina,

I think that you can do the following

insert into TableName (AutoNumberField) values (0)

I think that will create a row, assign the autonumber value, and populate
the
default value for the expiration date.

--
Guy M. Saenger
[EMAIL PROTECTED]
214.448.8887

- Original Message -
From: Dina Hess [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, August 01, 2001 12:20 PM
Subject: How can I insert a new record with no values?


 Hello all,

 Would anyone be able to tell me how I can insert a row into a table that
requires no values. My MS Access table stores only an auto number and an
expiration date. The auto number, of course, is generated by the dbms and
the expiration date, which is set to a default value, is also generated by
the dbms, so there's no need for a field list or a values list in the SQL
statement. CF doesn't like my syntax as follows:

 INSERT INTO Table ( )
 VALUES ( )

 I've also tried a few other approaches---all to no avail. Your help would
be much appreciated.

 TYIA,
 Dina
 Official Member of the CF Newbie Club :-)




~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How can I insert a new record with no values?

2001-08-01 Thread Philip Arnold - ASP

 Would anyone be able to tell me how I can insert a row into a
 table that requires no values. My MS Access table stores only an
 auto number and an expiration date. The auto number, of course,
 is generated by the dbms and the expiration date, which is set to
 a default value, is also generated by the dbms, so there's no
 need for a field list or a values list in the SQL statement. CF
 doesn't like my syntax as follows:

 INSERT INTO Table ( )
 VALUES ( )

 I've also tried a few other approaches---all to no avail. Your
 help would be much appreciated.

INSERT INTO Table (Field1)
VALUES (NULL)

That should do it as long as the field can accept NULL values

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

Websites for the real world

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How can I insert a new record with no values?

2001-08-01 Thread Costas Piliotis

Create a garbage field.  It's the only way.  I know in sql server, you just
set identity insert off, but I don't think Access has that.

Isn't it easier to just insert a null value into a garbage field and be done
with it?



-Original Message-
From: Dina Hess [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 01, 2001 10:20 AM
To: CF-Talk
Subject: How can I insert a new record with no values?


Hello all,

Would anyone be able to tell me how I can insert a row into a table that
requires no values. My MS Access table stores only an auto number and an
expiration date. The auto number, of course, is generated by the dbms and
the expiration date, which is set to a default value, is also generated by
the dbms, so there's no need for a field list or a values list in the SQL
statement. CF doesn't like my syntax as follows:

INSERT INTO Table ( )
VALUES ( )

I've also tried a few other approaches---all to no avail. Your help would be
much appreciated.

TYIA,
Dina
Official Member of the CF Newbie Club :-)
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How can I insert a new record with no values?

2001-08-01 Thread Pete Freitag

Have you tried just: INSERT INTO Table  ?


Pete Freitag ([EMAIL PROTECTED])
CFDEV.COM
ColdFusion Developers Resources
http://www.cfdev.com/

-Original Message-
From: Dina Hess [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 1:20 PM
To: CF-Talk
Subject: How can I insert a new record with no values?


Hello all,

Would anyone be able to tell me how I can insert a row into a table that
requires no values. My MS Access table stores only an auto number and an
expiration date. The auto number, of course, is generated by the dbms and
the expiration date, which is set to a default value, is also generated by
the dbms, so there's no need for a field list or a values list in the SQL
statement. CF doesn't like my syntax as follows:

INSERT INTO Table ( )
VALUES ( )

I've also tried a few other approaches---all to no avail. Your help would be
much appreciated.

TYIA,
Dina
Official Member of the CF Newbie Club :-)
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How can I insert a new record with no values?

2001-08-01 Thread Dina Hess

Guy,

Thanks for your input...unfortunately, that query produces a row that overrides the 
autonumber with the value 0...

back to the drawing board... :-)

Dina
  - Original Message - 
  From: Guy M. Saenger 
  To: CF-Talk 
  Sent: Wednesday, August 01, 2001 1:03 PM
  Subject: Re: How can I insert a new record with no values?


  Dina,

  I think that you can do the following

  insert into TableName (AutoNumberField) values (0)

  I think that will create a row, assign the autonumber value, and populate
  the
  default value for the expiration date.

  --
  Guy M. Saenger
  [EMAIL PROTECTED]
  214.448.8887

  - Original Message -
  From: Dina Hess [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Wednesday, August 01, 2001 12:20 PM
  Subject: How can I insert a new record with no values?


   Hello all,
  
   Would anyone be able to tell me how I can insert a row into a table that
  requires no values. My MS Access table stores only an auto number and an
  expiration date. The auto number, of course, is generated by the dbms and
  the expiration date, which is set to a default value, is also generated by
  the dbms, so there's no need for a field list or a values list in the SQL
  statement. CF doesn't like my syntax as follows:
  
   INSERT INTO Table ( )
   VALUES ( )
  
   I've also tried a few other approaches---all to no avail. Your help would
  be much appreciated.
  
   TYIA,
   Dina
   Official Member of the CF Newbie Club :-)
  
  
  
  
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How can I insert a new record with no values?

2001-08-01 Thread Dina Hess

Philip,

The autonumber field in my query does not accept nulls...but thank you for your 
input...

Dina
  - Original Message - 
  From: Philip Arnold - ASP 
  To: CF-Talk 
  Sent: Wednesday, August 01, 2001 12:50 PM
  Subject: RE: How can I insert a new record with no values?


   Would anyone be able to tell me how I can insert a row into a
   table that requires no values. My MS Access table stores only an
   auto number and an expiration date. The auto number, of course,
   is generated by the dbms and the expiration date, which is set to
   a default value, is also generated by the dbms, so there's no
   need for a field list or a values list in the SQL statement. CF
   doesn't like my syntax as follows:
  
   INSERT INTO Table ( )
   VALUES ( )
  
   I've also tried a few other approaches---all to no avail. Your
   help would be much appreciated.

  INSERT INTO Table (Field1)
  VALUES (NULL)

  That should do it as long as the field can accept NULL values

  Philip Arnold
  Director
  Certified ColdFusion Developer
  ASP Multimedia Limited
  T: +44 (0)20 8680 1133

  Websites for the real world

  **
  This email and any files transmitted with it are confidential and
  intended solely for the use of the individual or entity to whom they
  are addressed. If you have received this email in error please notify
  the system manager.
  **
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How can I insert a new record with no values?

2001-08-01 Thread Dina Hess

I may have to do that! Thanks for the suggestion.
  - Original Message - 
  From: Costas Piliotis 
  To: CF-Talk 
  Sent: Wednesday, August 01, 2001 12:54 PM
  Subject: RE: How can I insert a new record with no values?


  Create a garbage field.  It's the only way.  I know in sql server, you just
  set identity insert off, but I don't think Access has that.

  Isn't it easier to just insert a null value into a garbage field and be done
  with it?



  -Original Message-
  From: Dina Hess [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, August 01, 2001 10:20 AM
  To: CF-Talk
  Subject: How can I insert a new record with no values?


  Hello all,

  Would anyone be able to tell me how I can insert a row into a table that
  requires no values. My MS Access table stores only an auto number and an
  expiration date. The auto number, of course, is generated by the dbms and
  the expiration date, which is set to a default value, is also generated by
  the dbms, so there's no need for a field list or a values list in the SQL
  statement. CF doesn't like my syntax as follows:

  INSERT INTO Table ( )
  VALUES ( )

  I've also tried a few other approaches---all to no avail. Your help would be
  much appreciated.

  TYIA,
  Dina
  Official Member of the CF Newbie Club :-)
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How can I insert a new record with no values?

2001-08-01 Thread Dina Hess

Pete,

I thought your suggestion would be the answer...the syntax seemed familiar...but, 
alas, CF Server balks again...thank you for the suggestion...

Dina
  - Original Message - 
  From: Pete Freitag 
  To: CF-Talk 
  Sent: Wednesday, August 01, 2001 1:07 PM
  Subject: RE: How can I insert a new record with no values?


  Have you tried just: INSERT INTO Table  ?


  Pete Freitag ([EMAIL PROTECTED])
  CFDEV.COM
  ColdFusion Developers Resources
  http://www.cfdev.com/

  -Original Message-
  From: Dina Hess [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, August 01, 2001 1:20 PM
  To: CF-Talk
  Subject: How can I insert a new record with no values?


  Hello all,

  Would anyone be able to tell me how I can insert a row into a table that
  requires no values. My MS Access table stores only an auto number and an
  expiration date. The auto number, of course, is generated by the dbms and
  the expiration date, which is set to a default value, is also generated by
  the dbms, so there's no need for a field list or a values list in the SQL
  statement. CF doesn't like my syntax as follows:

  INSERT INTO Table ( )
  VALUES ( )

  I've also tried a few other approaches---all to no avail. Your help would be
  much appreciated.

  TYIA,
  Dina
  Official Member of the CF Newbie Club :-)
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How can I insert a new record with no values?

2001-08-01 Thread Guy M. Saenger

Sorry.  I am pretty sure that it works in SQL Server.  Was not sure about
Access.

--
Guy M. Saenger
[EMAIL PROTECTED]
214.448.8887

- Original Message -
From: Dina Hess [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, August 01, 2001 3:00 PM
Subject: Re: How can I insert a new record with no values?


 Guy,

 Thanks for your input...unfortunately, that query produces a row that
overrides the autonumber with the value 0...

 back to the drawing board... :-)

 Dina
   - Original Message -
   From: Guy M. Saenger
   To: CF-Talk
   Sent: Wednesday, August 01, 2001 1:03 PM
   Subject: Re: How can I insert a new record with no values?


   Dina,

   I think that you can do the following

   insert into TableName (AutoNumberField) values (0)

   I think that will create a row, assign the autonumber value, and
populate
   the
   default value for the expiration date.

   --
   Guy M. Saenger
   [EMAIL PROTECTED]
   214.448.8887

   - Original Message -
   From: Dina Hess [EMAIL PROTECTED]
   To: CF-Talk [EMAIL PROTECTED]
   Sent: Wednesday, August 01, 2001 12:20 PM
   Subject: How can I insert a new record with no values?


Hello all,
   
Would anyone be able to tell me how I can insert a row into a table
that
   requires no values. My MS Access table stores only an auto number and an
   expiration date. The auto number, of course, is generated by the dbms
and
   the expiration date, which is set to a default value, is also generated
by
   the dbms, so there's no need for a field list or a values list in the
SQL
   statement. CF doesn't like my syntax as follows:
   
INSERT INTO Table ( )
VALUES ( )
   
I've also tried a few other approaches---all to no avail. Your help
would
   be much appreciated.
   
TYIA,
Dina
Official Member of the CF Newbie Club :-)
   
   
   
   

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How can I insert a new record with no values?

2001-08-01 Thread Bosky, Dave

Insert ' ' as itemname

-Original Message-
From: Guy M. Saenger [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 01, 2001 4:24 PM
To: CF-Talk
Subject: Re: How can I insert a new record with no values?


Sorry.  I am pretty sure that it works in SQL Server.  Was not sure about
Access.

--
Guy M. Saenger
[EMAIL PROTECTED]
214.448.8887

- Original Message -
From: Dina Hess [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, August 01, 2001 3:00 PM
Subject: Re: How can I insert a new record with no values?


 Guy,

 Thanks for your input...unfortunately, that query produces a row that
overrides the autonumber with the value 0...

 back to the drawing board... :-)

 Dina
   - Original Message -
   From: Guy M. Saenger
   To: CF-Talk
   Sent: Wednesday, August 01, 2001 1:03 PM
   Subject: Re: How can I insert a new record with no values?


   Dina,

   I think that you can do the following

   insert into TableName (AutoNumberField) values (0)

   I think that will create a row, assign the autonumber value, and
populate
   the
   default value for the expiration date.

   --
   Guy M. Saenger
   [EMAIL PROTECTED]
   214.448.8887

   - Original Message -
   From: Dina Hess [EMAIL PROTECTED]
   To: CF-Talk [EMAIL PROTECTED]
   Sent: Wednesday, August 01, 2001 12:20 PM
   Subject: How can I insert a new record with no values?


Hello all,
   
Would anyone be able to tell me how I can insert a row into a 
 table
that
   requires no values. My MS Access table stores only an auto number and an
   expiration date. The auto number, of course, is generated by the 
 dbms
and
   the expiration date, which is set to a default value, is also 
 generated
by
   the dbms, so there's no need for a field list or a values list in 
 the
SQL
   statement. CF doesn't like my syntax as follows:
   
INSERT INTO Table ( )
VALUES ( )
   
I've also tried a few other approaches---all to no avail. Your 
 help
would
   be much appreciated.
   
TYIA,
Dina
Official Member of the CF Newbie Club :-)
   
   
   
   

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How can I insert a new record with no values?

2001-08-01 Thread Dina Hess

Thank you, Dave...but that didn't work either. Meanwhile, I've discovered the 
solution! Here it is, for all who come after:

INSERT INTO Table default values

Dina
  - Original Message - 
  From: Bosky, Dave 
  To: CF-Talk 
  Sent: Wednesday, August 01, 2001 3:37 PM
  Subject: RE: How can I insert a new record with no values?


  Insert ' ' as itemname

  -Original Message-
  From: Guy M. Saenger [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, August 01, 2001 4:24 PM
  To: CF-Talk
  Subject: Re: How can I insert a new record with no values?


  Sorry.  I am pretty sure that it works in SQL Server.  Was not sure about
  Access.

  --
  Guy M. Saenger
  [EMAIL PROTECTED]
  214.448.8887

  - Original Message -
  From: Dina Hess [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Wednesday, August 01, 2001 3:00 PM
  Subject: Re: How can I insert a new record with no values?


   Guy,
  
   Thanks for your input...unfortunately, that query produces a row that
  overrides the autonumber with the value 0...
  
   back to the drawing board... :-)
  
   Dina
 - Original Message -
 From: Guy M. Saenger
 To: CF-Talk
 Sent: Wednesday, August 01, 2001 1:03 PM
 Subject: Re: How can I insert a new record with no values?
  
  
 Dina,
  
 I think that you can do the following
  
 insert into TableName (AutoNumberField) values (0)
  
 I think that will create a row, assign the autonumber value, and
  populate
 the
 default value for the expiration date.
  
 --
 Guy M. Saenger
 [EMAIL PROTECTED]
 214.448.8887
  
 - Original Message -
 From: Dina Hess [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Wednesday, August 01, 2001 12:20 PM
 Subject: How can I insert a new record with no values?
  
  
  Hello all,
 
  Would anyone be able to tell me how I can insert a row into a 
   table
  that
 requires no values. My MS Access table stores only an auto number and an
 expiration date. The auto number, of course, is generated by the 
   dbms
  and
 the expiration date, which is set to a default value, is also 
   generated
  by
 the dbms, so there's no need for a field list or a values list in 
   the
  SQL
 statement. CF doesn't like my syntax as follows:
 
  INSERT INTO Table ( )
  VALUES ( )
 
  I've also tried a few other approaches---all to no avail. Your 
   help
  would
 be much appreciated.
 
  TYIA,
  Dina
  Official Member of the CF Newbie Club :-)
 
 
 
 
  
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists