The optimal solution is, of course to have separate compiled queries, but I can understand your pain in managing so many objects.
You should probably leave the WITH RECOMPILE option on. Most of the time, a bad query plan is worse than recompiling.
Try this article to see if there is anything...
Try setting the whole thing to a variable first, then assign the variable to the rowsource:
strSQL="SELECT colA, colB, colC FROM tbl WHERE colA LIKE '%" & form.control & "%' ORDER BY colA"
Try using the Microsoft COMM control to deal with the COM port.
Check out http://msdn.microsoft.com/library/en-us/comm98/html/vbobjComm.asp for more info on the COMM control.
Try the shellsort algorithim at vb2themax:
http://www.vb2themax.com/Item.asp?PageID=CodeBank&Cat=130&ID=18
You may need to alter to convert the value to a number so it sorts properly. With the values you are using, it will perform a sort where 10-0-1 comes before 7-0-1.
If designed properly, things should be ok. Monitor the performance, and check http://www.sql-server-performance.com for suggestions if you see degredation.
Declare a Public Enum and make the property use that enum as the variable type.
Check out http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vastmenum.asp for more information
The easiest and simplest way is through the use of the CDONTS Newmail object:
Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")
myMail.From = "Example@microsoft.com"
myMail.To = "Someone@microsoft.com"
myMail.Subject = "Sample Message"...
It looks as if you have two input parameters:
CREATE PROCEDURE [dbo].[ORDER_ACTIVITY_REPORT] @startdate as datetime, @enddate as datetime
But you are running it with 4 with the not null check:
exec order_activity_report '2002-08-01', '2002-08-07',
'%van dyk%', '%840%'
Try adding the @name...
The mask property of the control can be set to ##:##:## ??. However, the control can only distinguish between numbers and letters. The user could enter 99:99:99 XX. You would still have to validate the time with the IsDate() function.
If you are going with an ActiveX control, try the DTPicker...
Without using output parameters (the most efficient way to go), at the end of your stored procedure, just do:
select @@Identity
This will return the identity that was create in the insert.
A quick solution:
select cast(cast(datepart(month, dateadd(month,1,getdate())) as varchar(2)) + '/1/' + cast(datepart(year, dateadd(month, 1, getdate())) as varchar(4)) as datetime)
Note: It's important that the new date (i.e. dateadd(month, 1, getdate()) is used for the year portion since...
To set a value when a column is null, use the IsNull() function:
select field1, IsNull(field2,'Default2') as field2, field3
from table1
where field1='value'
Found a better, easier way:
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias...
A somewhat decent article that explains notifications and has an example of using the treeview control:
http://www.vbbox.com/codebox/articles/article002.htm
Technically, the @newtable is a table variable and is not a temp table...:-)
However, without a temporary storage area here, I can only see using a cursor and looping through and checking each row for existence and building a string of items not in the list.
The hour() function returns an integer between 0 and 23 regardless of the type of clock used.
The now() function returns the date-time depending on the way Windows Regional settings are used.
I actually have a 24 hour clock and right$(now,2) returns the seconds.
You already have a Temp Table #SOAP, but that can be any other table with the values or a table variable so as to avoid the temp table constraint.
Try this (uses #SOAP):
--create some base data
CREATE TABLE #Soap (nID int)
INSERT INTO #SOAP VALUES(1)
INSERT INTO #SOAP VALUES(2)
INSERT INTO...
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.