Looks like you accidentally put a space in the querystring:
Response.Redirect "nextpage.asp? variable=" & Request.Form("variable")
should be
Response.Redirect "nextpage.asp?variable=" & Request.Form("variable")
Actually, I don't use a lot of stored procedures, except for complicated updates. Instead, I create the "delete" functionality in the business logic tier, which sequences cascading deletes as necessary to avoid constraint errors. My goal is to have SQL Server generate no errors at all...
An example from BOL:
USE Northwind
GO
DECLARE abc CURSOR FOR
SELECT CompanyName
FROM Shippers
OPEN abc
GO
FETCH NEXT FROM abc
GO
UPDATE Shippers SET CompanyName = N'Speedy Express, Inc.'
WHERE CURRENT OF abc
GO
CLOSE abc
DEALLOCATE abc
GO
Null can't be used in equality statements (remember that it means, "I don't know" - so how can you have two unknown values be equal?)
Instead use Is Not Null and Is Null. For example:
If myVariable Is Not Null Then
'do stuff
End If
BUT!!!! Request.Form("myField") will NEVER...
Sounds like you're used to using recordsets in VB. The equivalent in SQL is cursors. There's a lot of syntax, so start with books online. BUT, there's probably a better way (given what you've described) to write a single SQL update statement that would do the trick, and much faster than cursors.
A foreign key is in fact a particular type of index, so no table scan is necessary. They are very low overhead (per documentation) compared to triggers. But if it is your goal to prevent deletions on the front end, you will probably want to use your select in order to find out ahead of time...
In the class definition for that cell, use, e.g.:
.x124
{mso-style-parent:style0;
mso-number-format:0;}
Then in the cell, use:
<td height=17 class=x124 align=right width=135 style='height:12.75pt; width:101pt' x:num="12345678901234">12345678901234</td>
This was generated by 1)...
Do you want the ranking procedure to happen on the client, or server? For example, if you have few users making lots of ranking changes, probably client is best for display update speed issues. If, on the other hand, you have lots of users making updates, then you should use server-side, for...
First, set a reference in the vb project to the ASP environment. Then, you can pass the request object right into ASP:
Public Sub processHTML(myRequest as Request)
Dim myVariable as String
myVariable = myRequest.Form("myField")
End Sub
The syntax is probably bad, but you get the idea.
First step is, look up DATEADD in Books Online, to get the whole syntax. But, basically DATEADD is what you need. If, for example, you wanted to add 2 hours to start_time, you would say:
end_time = DATEADD(hh, 2, start_time)
Actually, 1.0000000000E-02 and 0.0001 are not the same number. 1.0000000000E-04 and 0.0001 are the same number. I'm hoping that the latter is what's happening (you said "something like")...
1.0000000000E-02 and 0.0001 are the same value, formatted differently. VBScript's FormatNumber(Expression [,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]]) function will allow you to format it however you want for display.
The equivalent in SQL Server for autonumber is IDENTITY. You can set that as an option in Enterprise Manager, in table design.
Also in table design mode, you can set defaults. GETDATE() as a default will return today's date.
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.