I didn't test this completely.
It works perfect when adding only one record. When I try to add more than one it gives the error below:
Can I change the procedure to accomodate adding more than one?
Thanks.
Thanks very much.
I'll try that.
I appear to have it now working using the following but I try your suggestion too:
Thanks again!
CREATE TRIGGER [dbo].[Delete_Logo]
ON [dbo].[Business] AFTER DELETE
AS
BEGIN
DECLARE @LogoID int
SELECT @LogoID = LogoID FROM deleted
DELETE FROM...
Thanks, I added the code and it gave an error:
On this line I changed from:
On [Company_Logos].Logo_ID = deleted.LogoID
To:
On [Business_Logos].Logo_ID = Business.LogoID
The trigger then worked but it deletes everything from [Business_Logos] apart from the record I want it to.
Do I...
Thanks chaps.
If I add the following code the correct record from the [business] table is deleted however, it deletes everything other than the correct record from the [business_logos] table.
sql = "DELETE FROM Business" & _
"sql = sql & " WHERE [Business_ID]='" & str_delete & "'" & _...
I use the following SQL statement coded in ASP to delete a record from a SQL server database:
It deletes the record based on a dropdown menu which send the Business_ID.
SQL = "DELETE FROM Business"
SQL = SQL & " WHERE [Business_ID]='" & str_delete & "'"
I also want to delete an image that...
I have the following code, which inserts into a database a record with a primary key named System_ID.
For i = 0 to Ubound(val)
if len(val(i))=2 then
str_SQL = "INSERT INTO System ([BusinessID], [System Code], [System Description])"
str_SQL = str_SQL & " VALUES "
str_SQL = str_SQL & "('" &...
Thanks, the original post by foxbox worked for me but only if the field already contained a value. Otherwise it produced an error.
Foxbox where do you call the function FQ?
Thanks.
I have a text box on my page that calls a record field from an SQL database like so:
<textarea name="EditText" cols="60" rows="5" id="EditText"><% Response.Write obj_RS1("Notes") %></textarea>
The field Notes data type is varchar(8000)
When I add an ' (apostrophe) into the text box and...
Each of the “three values” can change so AA – Test – AA might be something like BB – test1 - CC
So in the two examples I above I basically want to be left with Test or test1
The following code replaces the “first value”
replace(/\w+[- ]+/,'');
so I’m left with Test – AA
I want to replace...
I have the following function that replaces part of a string so that the following:
AA – Test – AA
Becomes:
Test – AA
function Add () {
var selObj = document.getElementById('Test1');
var txtObj = document.getElementById('Test2');
var selIndex = selObj.selectedIndex...
I have the following code that I am using to try to only allow access to a page to users with a certain IP address.
[code]
<%
Select Case Request.ServerVariables("remote_addr")
Case "ip address"
Case Else
Response.Redirect "http://www.google.co.uk/"
Response.End
End Select
%>
This doesn't...
Thanks foxbox.
This is it:
input = split(Request.Form("SystemCode")," ")
For i = 0 to Ubound(input)
Response.Write "Inputs are -"& input(i)
Next
For i = 0 to Ubound(input)
Response.Write "Inputs are -"& input(i)
sSQL = "INSERT INTO System ([BusinessID], [System Code], [System...
I would want to be able to add these values into the input box so I would be typing more than one "two digit code" to the input box. e.g. AA BB CC. Whilst only selecting one value from the dropdown.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.