SQL fail s to give feedback to IIS after INSERT

SQL fail s to give feedback to IIS after INSERT

Post by Ulf » Sun, 11 Oct 1998 04:00:00



I cannot get MS SQLserver (6.5) to feed back the information that was
just sent to it from MS IIS (4) through ODBC.

After a form is filled out, the submit action calls the .idc script
below. Note that NUMDEM is defined as identity. The script is supposed
to feedback the information that the user just entered. The problem I
have is that that does not happen, i.e. the 'select' query comes back
empty! What am I doing wrong? Can I not put insert and select statements
in the same query script? Should I separate them by rows that contain
'SQL Statement:'?

Any help is apprecitated!
-- Ulf

(PS: which newsgroup(s) is (are) the best place to ask these kind of
questions?)

   Datasource: <data_source>
   Username: <user_name>
   Password: <password>
   RequiredParameters: CODCLI
   Template: 3235-verify.htx
   SQLStatement:
   + insert into LIJ_TABLE_3235_1
   + (DATE1, PERSONNES, CODCLI, COCON, NAT1, NAT2, NAT3, NAT4, NAT5,
NAT6, PER1, PER2, PER3)
   + values (getdate(), convert(bit(1),'%PERSONNES%'), '%CODCLI%',
'%COCON%', convert(bit(1),'%NAT1%'), convert(bit(1),'%NAT2%'),
convert(bit(1),'%NAT3%'), convert(bit(1),'%NAT4%'),
convert(bit(1),'%NAT5%'), convert(bit(1),'%NAT6%'), convert(datetime,
'%PER1%'), convert(datetime, '%PER2%'), convert(bit(1),'%PER3%'))

   + select NUMDEM from LIJ_TABLE_3235_1

 
 
 

SQL fail s to give feedback to IIS after INSERT

Post by Ulf » Sun, 11 Oct 1998 04:00:00


I cannot get MS SQLserver (6.5) to feed back the information that was
just sent to it from MS IIS (4) through ODBC.

After a form is filled out, the submit action calls the .idc script
below. Note that NUMDEM is defined as identity. The script is supposed
to feedback the information that the user just entered. The problem I
have is that that does not happen, i.e. the 'select' query comes back
empty! What am I doing wrong? Can I not put insert and select statements
in the same query script? Should I separate them by rows that contain
'SQL Statement:'?

Any help is apprecitated!
-- Ulf

(PS: which newsgroup(s) is (are) the best place to ask these kind of
questions?)

   Datasource: <data_source>
   Username: <user_name>
   Password: <password>
   RequiredParameters: CODCLI
   Template: 3235-verify.htx
   SQLStatement:
   + insert into LIJ_TABLE_3235_1
   + (DATE1, PERSONNES, CODCLI, COCON, NAT1, NAT2, NAT3, NAT4, NAT5,
NAT6, PER1, PER2, PER3)
   + values (getdate(), convert(bit(1),'%PERSONNES%'), '%CODCLI%',
'%COCON%', convert(bit(1),'%NAT1%'), convert(bit(1),'%NAT2%'),
convert(bit(1),'%NAT3%'), convert(bit(1),'%NAT4%'),
convert(bit(1),'%NAT5%'), convert(bit(1),'%NAT6%'), convert(datetime,
'%PER1%'), convert(datetime, '%PER2%'), convert(bit(1),'%PER3%'))

   + select NUMDEM from LIJ_TABLE_3235_1


 
 
 

SQL fail s to give feedback to IIS after INSERT

Post by Arsen V » Mon, 12 Oct 1998 04:00:00


Do you think it is possible that when you perform insert and select of the
newly inserted data in the same .idc script the select executes BEFORE the
insert transaction is commited and therefore the data is not yet physically
written into the database and cannot be selected?

Arsen V.
Emergency 24, Inc.

 
 
 

SQL fail s to give feedback to IIS after INSERT

Post by Ulf » Wed, 14 Oct 1998 04:00:00


I tried to insert 'begin transaction' and 'commit transaction' pair around each
of the the insert and select statements (see below). The result is the same.
Any more help?


> Do you think it is possible that when you perform insert and select of the
> newly inserted data in the same .idc script the select executes BEFORE the
> insert transaction is commited and therefore the data is not yet physically
> written into the database and cannot be selected?

> Arsen V.
> Emergency 24, Inc.

Current .IDC file code:
Datasource: LIJ_SOURCE
Username: <userID>
Password: <pwd>
RequiredParameters: CODCLI
Template: 3235-verify.htx
SQLStatement:
+ begin transaction
+ insert into LIJ_TABLE_3235_1
+ (PERSONNES, CODCLI, COCON, NAT1, NAT2, NAT3, NAT4, NAT5, NAT6, PER3)
+ values (convert(bit(1),'1'), 'testcode', 'coctest', convert(bit(1),'1'),
convert(bit(1),'2'), convert(bit(1),'1'), convert(bit(1),'1'),
convert(bit(1),'1'), convert(bit(1),'1'), convert(bit(1),'1'))
+ commit transaction

+ select * from LIJ_TABLE_3235_1