Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2006, 03:39 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't INSERT into database's table !

Hi everyone !!!
The past two days I am trying to make a survey to work !
Unfortunately I haven't accomplised yet :-(

So this is my problem...
I am using ASP, MS-SQL for the survey.
When I take the survey for the first time evetything is working and the fields are inserted correctly in the table !
If I take the survey for the second time... there is no insert in the table !!!

This is code...
Code:
dim Rs_Qu
      set Rs_Qu = myCon.Execute("Select * From QUESTION ")
      if Rs_Qu.Eof then
         myCon.Execute ("Insert into QUESTION (" & SqlStr_1 & ") values (" & SqlStr_2 & ")")


Also, I must tell you that when I use the SQL Pane and do ...
Code:
Insert into QUESTION (" & SqlStr_1 & ") values (" & SqlStr_2 & ")
replacing of course " & SqlStr_1 & " and " & SqlStr_2 & "
i can insert the entry !!!

Please help !


Visit...
http://www.kanenas.net
News and Ideas about programming
 
Old August 10th, 2006, 05:56 AM
Authorized User
 
Join Date: Sep 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabodh_mishra
Default

I wonder why u have put up statement like "if Rs_Qu.Eof then".
It will only allow you to insert record when table is empty i.e. first time. Any subsequent request will be declined.


 
Old August 10th, 2006, 07:37 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes I know ! I have figured it out !!!
I am so sorry I forgot to make a post...
:-(

Visit...
http://www.kanenas.net
News and Ideas about programming





Similar Threads
Thread Thread Starter Forum Replies Last Post
Choice of database's for attempt at commercializat TomW Access VBA 3 November 21st, 2008 09:08 AM
Insert table records into another table. hewstone999 Access VBA 2 March 5th, 2008 11:01 AM
how to insert into SQL table p2ptolu Classic ASP Databases 1 June 17th, 2005 06:52 AM
How to insert an image to a table ahmadnajib MySQL 1 August 20th, 2004 01:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.