|
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..
|
|
|
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.
|
|
|
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.
|
|
|
|
|
|
|
|