codetoad.com
  ASP Shopping Cart, Forum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  help needed in overwriting and appending..  Archive Import (ger) at 21:40 on Monday, June 30, 2003
 

i got a problem how to start or go about doing it..i got this three table in the database..MEANQUE, MEANSCORE, MOVINGAVG...when my records are added it,i expected my script to detect whether the records are already inside..if it is..it overwrite..i not..it add in the records..pls help.thxs..

  Re: help needed in overwriting and appending..  Yusairi at 09:09 on Monday, July 07, 2003
 

hi ger...

your question is to general...
but you can learn from the beginning
what ASP is ?.
please refer http://www.learnasp.com
(my favourite link)

or, if you need my opinion, after you
had make SQL query, please specify
sample like this :-

<%

`checking the data exist or not
`Server Name=test
`SQL Server database namae=test

cme = "DRIVER={SQL SERVER};SERVER=test;UID=sa;pwd=;DATABASE=test"
cmdsql = "SELECT * FROM TEST WHERE ID=`"&id&"` "
set rs = Server.CreateObject("adodb.Recordset")
rs.open cmdsql, cme


if Not rs.EOF then
Response.Write "Record Not Exist !!!"
` insert your SQL Insert command here

else
Response.Write "Record Not Exist !!!"
` insert your SQL update command here

end if
%>


that`s my technique and very frequently
use in my ASP ( <% %> ) or PHP ( <?php ?> )
programming.

bye.



  Re: help needed in overwriting and appending..  Yusairi at 09:10 on Monday, July 07, 2003
 

hi ger...

your question is to general...
but you can learn from the beginning
what ASP is ?.
please refer http://www.learnasp.com
(my favourite link)

or, if you need my opinion, after you
had make SQL query, please specify
sample like this :-

<%

`checking the data exist or not
`Server Name=test
`SQL Server database namae=test

cme = "DRIVER={SQL SERVER};SERVER=test;UID=sa;pwd=;DATABASE=test"
cmdsql = "SELECT * FROM TEST WHERE ID=`"&id&"` "
set rs = Server.CreateObject("adodb.Recordset")
rs.open cmdsql, cme


if Not rs.EOF then
Response.Write "Record Exist !!!"
` insert your SQL Insert command here

else
Response.Write "Record Not Exist !!!"
` insert your SQL update command here

end if
%>


that`s my technique and very frequently
use in my ASP ( <% %> ) or PHP ( <?php ?> )
programming.

bye.










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  matrix addition
•  Re: Storing data from HTML to Excel or TXT
•  Re: function within loop problem
•  Re: Ô‡´ò¥¯¥é¥Ö¤Ã� ¥Æ©`¥é©`¥á¥¤¥É£ò£±£±¥¢¥¤¥¢¥ó ¤Î£··¬ ¤Ç¤¹
•  Re: Replace
•  Re: タイトリスト AP2アイアン 712ã�®æƒ…å �
•  Re: SMS from Perl using HTTP request
•  Re: Charl Schwartzel
•  Re: Adhyayan - Annual Student Conference and Online Coding Festival


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2013