Re: ASP ADO?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Agoston Bejo (gusz1_at_freemail.hu)
Date: 07/27/04

  • Next message: Agoston Bejo: "Re: adding variable to request.form"
    Date: Tue, 27 Jul 2004 09:59:03 +0200
    
    

    The correct format of the SQL INSERT statement is:
    INSERT INTO table_name(field1, field2, ..., fieldn)
    VALUES (value_1, value_2, ..., value_n);

    I'm not sure you cannot insert a row without specifying all the columns, but
    I guess you can't. But why don't put NULL values manually into the unused
    columns?
    INSERT INTO INSERT INTO F0911C (GLKCO, GLDCT, GLDOC, GLDGJ ) VALUES(0010',
    NULL, NULL, NULL);

    This always works (provided that NULL values are allowed in the last three
    columns).

    "Sam" <cybersam88@hotmail.com> wrote in message
    news:%23Ikab54cEHA.3016@tk2msftngp13.phx.gbl...
    > Complete Coding
    > ------------------
    > rsAdd = "INSERT INTO F0911C (GLKCO, GLDCT, GLDOC, GLDGJ ) VALUES"
    > rsAdd = rsAdd & " ('0010'),"
    > rsAdd = rsAdd & " ('1234'),"
    > rsAdd = rsAdd & " (104001),"
    > rsAdd = rsAdd & " (1),"
    >
    > Question?
    > ----------
    > Can I perform the following coding (just wanna insert few table column
    > instead of full table columns)?
    > rsAdd = "INSERT INTO F0911C (GLKCO ) VALUES"
    > rsAdd = rsAdd & " ('0010'),"
    >
    > Error Message When Perform Single Table Column (SQL Insert
    > -----------------------------------------------------------------
    > Microsoft OLE DB Provider for SQL Server error '80040e14'
    > There are more columns in the INSERT statement than values specified in
    the
    > VALUES clause. The number of values in the VALUES clause must match the
    > number of columns specified in the INSERT statement.
    > /jde/F0911C.asp, line 104
    >
    > Please advise.
    >
    > Thanks.
    >
    >


  • Next message: Agoston Bejo: "Re: adding variable to request.form"

    Relevant Pages

    • Buffered Records and Select ..
      ... Is there any way around we can select All the Buffered Records from a table ... through a SQL SELECT Statement Like by specifying a Where clause like RecN ...
      (microsoft.public.fox.programmer.exchange)
    • RE: Error: 25002. The specified buffer size is not valid.
      ... Try moving tempdb to a storage card using SQL CE 2.0 Books Online section ... "Specifying the Location of the Temporary Database .. ...
      (microsoft.public.sqlserver.ce)
    • Re: Specifying Cursor SQL
      ... From what I've read so far (John Palinski's book - I don't know how well it stands up against other publications, but it's done sterling service for me with respect to the Oracle SQL I've been doing the past few years), there doesn't seem to be an easy way of passing an SQL select statement to a function or procedure. ... I specified varchar2as I don't think I can just leave things open ended with specifying it as just varchar2 without a length specification? ... '-- begin '-- open cDistributions; close cDistributions; '-- return n_Distribution '-- ... Native Dynamic SQL. ...
      (comp.databases.oracle.server)
    • [OT] connecting to MS SQL on a different computer (DBD::ODBC)
      ... Can anyone give pointeron how to connect to a server which runs MS SQL ... I thought it would be as simple as specifying a host and ... Prev by Date: ...
      (comp.lang.perl.misc)
    • Re: error 3128 in query
      ... Try specifying a field or the entire set of fields in the SQL string. ... > I use an ACCESS 2003 front end to SQL server 2000. ... > But the same statement works when I try it in SQL server's Query Analyzer. ...
      (microsoft.public.access.queries)