Showing posts with label basic. Show all posts
Showing posts with label basic. Show all posts

Saturday, February 25, 2012

Chaching Sqldatasource datasets... can it be done? and a performance question.

I'm using visual basic coded datasets right now, and caching them, so as all of my web app users access the cache once the first person's gone to my site and initiallized the page.

If Cache("ds_cache")IsNothingThenDim dsAsNew DataSet

blah blah code blah blah blah

Cache.Insert("ds_cache", ds)EndIf

What I was wondering is, if it's possible to cache the datasets that get created and are used by Sqldatasources. Or if by chance caching is automatically done and controlled for these datasets, as it's the server that makes and handles them.

The reason I wonder about this because I'm not sure how you go about referencing one of those datasets, because you can't give them a name/id. And I've not found mention anywhere of you being able to do so.

The real point or question I'm trying to get at is to see which performs better , or uses less requests back to the server for the data as a lot of my data will be repeatedly used by all of my users and so I'd like to save myself from using as many repeated connections as possibles in regards to using a typed dataset versus filling my controls from a sqldatasource?

Thank you in advance for your response.

You know what, I pretty much found my answer:

http://msdn2.microsoft.com/en-us/library/z56y8ksb.aspx

The question still remains of if a sqldatasource would outperform a typed dataset?

It makes you wonder, as a typed dataset you don't have to worry about time spent on conversions, etc. but you would think that server built and controlled dataset might perform better, or atleast it would probably build faster when it's first created... please do reply if you have insight.

Chaching Sqldatasource datasets... can it be done? and a performance question.

I'm using visual basic coded datasets right now, and caching them, so as all of my web app users access the cache once the first person's gone to my site and initiallized the page.

If Cache("ds_cache") Is Nothing Then

Dim ds As New DataSet

blah blah code blah blah blah

Cache.Insert("ds_cache", ds)

End If

What I was wondering is, if it's possible to cache the datasets that get created and are used by Sqldatasources. Or if by chance caching is automatically done and controlled for these datasets, as it's the server that makes and handles them.

The reason I wonder about this because I'm not sure how you go about referencing one of those datasets, because you can't give them a name/id. And I've not found mention anywhere of you being able to do so.

The real point or question I'm trying to get at is to see which performs better , or uses less requests back to the server for the data as a lot of my data will be repeatedly used by all of my users and so I'd like to save myself from using as many repeated connections as possibles in regards to using a typed dataset versus filling my controls from a sqldatasource?

Thank you in advance for your response.

You know what, I pretty much found my answer:

http://msdn2.microsoft.com/en-us/library/z56y8ksb.aspx

The question still remains of if a sqldatasource would outperform a typed dataset?

It makes you wonder, as a typed dataset you don't have to worry about time spent on conversions, etc. but you would think that server built and controlled dataset might perform better, or atleast it would probably build faster when it's first created... please do reply if you have insight.

Friday, February 24, 2012

Cell1 = Cell2

I'm pulling my hair out now... What am I doing wrong
OK..
Header1 | Header
--+--
cell1 | cell
Very basic table layout..
If Cell1 is just a field value I can do cell2 = reportitems!cell1 an
it works find. However, if Cell1 is a calculation that's slightl
complex and do cell2 = reportitems:cell1 I get
> p:\formulacard\formulacard1\Formula Card SG.rdl The value expressio
for the textbox ?QtyReqdCell? refers to the report item ?kl?. Repor
item expressions can only refer to other report items within the sam
grouping scope or a containing grouping scope
Now this annoys the hell out of me because the cell1 on it's ow
renders fine and returns a values. What am I doing wrongRob,
Is this actually a table or a matrix?
What is the expression in cell 1, both when it succeeds and when it
fails.
The ReportItems option can only deal with items within the same scope,
i.e. on the same level. One of its uses was for exporting to Excel as
formulas instead of values, but there were some bugs with it so
Microsoft curtailed it's functionality a bit. I now avoid using
ReportItems if I can. I tend to make sure the query provides all the
data I need to populate cells, including calculations.
Chris
RobFarley wrote:
> I'm pulling my hair out now... What am I doing wrong?
> OK...
> Header1 | Header 2
> --+--
> cell1 | cell 2
> Very basic table layout...
> If Cell1 is just a field value I can do cell2 = reportitems!cell1 and
> it works find. However, if Cell1 is a calculation that's slightly
> complex and do cell2 = reportitems:cell1 I get
> > p:\formulacard\formulacard1\Formula Card SG.rdl The value expression
> for the textbox ?QtyReqdCell? refers to the report item ?kl?. Report
> item expressions can only refer to other report items within the same
> grouping scope or a containing grouping scope.
> Now this annoys the hell out of me because the cell1 on it's own
> renders fine and returns a values. What am I doing wrong?|||I've gone for that option now, everything is calculated in the quer

Sunday, February 19, 2012

CDOSYS Mail Using SQL Server

The procedure works without problems for the basic 'textbody' and 'htmlbody' type messages. The problem is I would like to get the CreateMHTMLBody method working. This works beautifully as a VBScript which I'm attempting to convert to SQL.

CREATE PROCEDURE usp_send_cdosysmail
@.From_Addr VARCHAR(500) ,
@.To_Addr VARCHAR(500) ,
@.Subject VARCHAR(500),
@.Body VARCHAR(4000) ,
@.SMTPserver VARCHAR(25) = 'localhost',
@.BodyType VARCHAR(10) = 'textbody'
AS

DECLARE @.imsg INT
DECLARE @.hr INT
DECLARE @.source VARCHAR(255)
DECLARE @.description VARCHAR(500)
DECLARE @.output VARCHAR(1000)

EXEC @.hr = sp_oacreate 'cdo.message', @.imsg out
EXEC @.hr = sp_oasetproperty @.imsg, 'configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusing").value','2'
EXEC @.hr = sp_oasetproperty @.imsg, 'configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").value', @.SMTPserver
EXEC @.hr = sp_oamethod @.imsg, 'configuration.fields.UPDATE', NULL

EXEC @.hr = sp_oasetproperty @.imsg, 'to', @.To_Addr
EXEC @.hr = sp_oasetproperty @.imsg, 'from', @.From_Addr
EXEC @.hr = sp_oasetproperty @.imsg, 'subject', @.Subject

IF @.BodyType <> 'URL'
BEGIN
EXEC @.hr = sp_oasetproperty @.imsg, @.BodyType, @.Body
END
ELSE
BEGIN
-- Generate The Body From The Input URL
EXEC @.hr = sp_oamethod @.imsg, 'CreateMHTMLBody', @.body, 0, '', ''
END

EXEC @.hr = sp_oamethod @.imsg, 'send', NULL

When I test the "EXEC @.hr = sp_oamethod @.imsg, 'CreateMHTMLBody', @.body, 0, '', ''" step it gives me a blank email.
The return code (@.hr) for that step is -2147211483 (x80042725).
There is no error message. Search as I might, I haven't been able to find a reference to that error.I found the answer:
EXEC @.hr = sp_OAMethod @.imsg, 'CreateMHTMLBody', NULL, @.body, 0, '',''
works!!!!

Tuesday, February 14, 2012

Catalog Not populating

I can not get the full text catalog to populate.
I have tried it on the most basic datababase and table.
The catalog creates, and it says it successfully
populates, but yet the item count is 0.
I have restored the same DB on a different server, and it
works fine. I have tried so many KB articles with no
luck. Has anyone every seen this?
Any help is appreciated.
The most obvious causes of this problem is:
http://support.microsoft.com/default...&Product=sql2k
http://support.microsoft.com/default...&Product=sql2k
Have you already followed the advice in these kb's?
Also please post the any messages you are getting in the application log
from MSSearch or MSSCI.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Steve" <scusick@.datapipe.com> wrote in message
news:023601c46f54$2f102620$3a01280a@.phx.gbl...
> I can not get the full text catalog to populate.
> I have tried it on the most basic datababase and table.
> The catalog creates, and it says it successfully
> populates, but yet the item count is 0.
> I have restored the same DB on a different server, and it
> works fine. I have tried so many KB articles with no
> luck. Has anyone every seen this?
> Any help is appreciated.
|||Here are the warnings
The crawl on project <SQLServer SQL0015500005> cannot be
started. All of the crawl seeds have been ignored because
of host, extension, or other URL restrictions. Error:
80040d07 - The specified URL is excluded and will not be
cataloged. The URL restriction rules may have to be
modified to include this URL.
The crawl seed <MSSQL75://SQLServer/6497e884> in project
<SQLServer SQL0015500005> cannot be accessed. Error:
80040d07 - The specified URL is excluded and will not be
cataloged. The URL restriction rules may have to be
modified to include this URL
One or more warnings or errors for Gatherer project
<SQLServer SQL0015500005> were logged to file
<e:\MSSQL\FTDATA\SQLServer\GatherLogs\SQL001550000 5.1.gthr>
.. If you are interested in these messages, please, look at
the file using the gatherer log query object (gthrlog.vbs,
log viewer web page).
I also ran thhrlog.vbs and got the following.
7/21/2004 4:10:56 PM Add The gatherer has
started
7/21/2004 4:10:56 PM Add The initialization
has completed
7/21/2004 4:11:10 PM Add Started Full
crawl
7/21/2004 4:11:10 PM MSSQL75://SQLServer/6497e884
Add URL is excluded
because the URL protocol is not recognized or restricted
7/21/2004 4:11:10 PM Add Completed Full
crawl
Anything anyone can do, would be amazing. I have been
trying for days!
Thanks

>--Original Message--
>The most obvious causes of this problem is:
>http://support.microsoft.com/default.aspx?scid=kb;en-
us;317746&Product=sql2k
>http://support.microsoft.com/default.aspx?scid=kb;en-
us;295772&Product=sql2k
>Have you already followed the advice in these kb's?
>Also please post the any messages you are getting in the
application log[vbcol=seagreen]
>from MSSearch or MSSCI.
>--
>Hilary Cotter
>Looking for a book on SQL Server replication?
>http://www.nwsu.com/0974973602.html
>
>"Steve" <scusick@.datapipe.com> wrote in message
>news:023601c46f54$2f102620$3a01280a@.phx.gbl...
it
>
>.
>
|||Steve,
The primary error is "URL is excluded because the URL protocol is not
recognized or restricted", and a quick search on Google turned up:
"Troubleshooting and Checking Protocol Handler Performance" at
http://msdn.microsoft.com/library/de... formance.asp
Problem:
Gatherer log error "URL is excluded because the URL protocol is not
recognized or restricted"
Solution:
Protocol handler registration may have failed. Run regedit to look at
HKLM\Software\Microsoft\Search\1.0\ProtocolHandler s or the DllRegisterServer
function.
Does this server have both SQL Server and SharePoint installed on it? Is
this an upgrade from SPPS to SQL Server from WSS?
Regards,
John
<anonymous@.discussions.microsoft.com> wrote in message
news:19a801c46f5f$cf3cefb0$a301280a@.phx.gbl...[vbcol=seagreen]
> Here are the warnings
> --
> The crawl on project <SQLServer SQL0015500005> cannot be
> started. All of the crawl seeds have been ignored because
> of host, extension, or other URL restrictions. Error:
> 80040d07 - The specified URL is excluded and will not be
> cataloged. The URL restriction rules may have to be
> modified to include this URL.
> The crawl seed <MSSQL75://SQLServer/6497e884> in project
> <SQLServer SQL0015500005> cannot be accessed. Error:
> 80040d07 - The specified URL is excluded and will not be
> cataloged. The URL restriction rules may have to be
> modified to include this URL
> One or more warnings or errors for Gatherer project
> <SQLServer SQL0015500005> were logged to file
> <e:\MSSQL\FTDATA\SQLServer\GatherLogs\SQL001550000 5.1.gthr>
> . If you are interested in these messages, please, look at
> the file using the gatherer log query object (gthrlog.vbs,
> log viewer web page).
> I also ran thhrlog.vbs and got the following.
> 7/21/2004 4:10:56 PM Add The gatherer has
> started
> 7/21/2004 4:10:56 PM Add The initialization
> has completed
> 7/21/2004 4:11:10 PM Add Started Full
> crawl
> 7/21/2004 4:11:10 PM MSSQL75://SQLServer/6497e884
> Add URL is excluded
> because the URL protocol is not recognized or restricted
> 7/21/2004 4:11:10 PM Add Completed Full
> crawl
> Anything anyone can do, would be amazing. I have been
> trying for days!
> Thanks
> us;317746&Product=sql2k
> us;295772&Product=sql2k
> application log
> it
|||can you try to regregister the various SQL FTS components?
Here is a script to do this:
save this to a batch file and run it from a command window:
cd "C:\Program Files\Common Files\System\MSSearch\Bin\"
%windir%\system32\Regsvr32 mssadmin.dll
%windir%\system32\Regsvr32 mssmmcsi.dll
%windir%\system32\Regsvr32 offfilt.dll
%windir%\system32\Regsvr32 %WINDIR%\System32\athprxy.dll
%windir%\system32\Regsvr32 ftsqlpar.dll
%windir%\system32\Regsvr32 msscntrs.dll
%windir%\system32\Regsvr32 mssmsg.dll
%windir%\system32\Regsvr32 mssmulpi.dll
%windir%\system32\Regsvr32 mssph.dll
%windir%\system32\Regsvr32 mssrch.dll
%windir%\system32\Regsvr32 msstools.dll
%windir%\system32\Regsvr32 objcreat.dll
%windir%\system32\Regsvr32 propdefs.dll
%windir%\system32\Regsvr32 srchadm.dll
%windir%\system32\Regsvr32 srchidx.dll
%windir%\system32\Regsvr32 tquery.dll
%windir%\system32\Regsvr32 %WINDIR%\Cluster\gathercl.dll
%windir%\system32\Regsvr32 nlhtml.dll
cd "C:\Program Files\Common Files\System\MSSearch\common\"
%windir%\system32\Regsvr32 mssitlb.dll
%windir%\system32\Regsvr32 %windir%\System32\athprxy.dll
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"John Kane" <jt-kane@.comcast.net> wrote in message
news:%23YkfjZ4bEHA.2972@.TK2MSFTNGP12.phx.gbl...
> Steve,
> The primary error is "URL is excluded because the URL protocol is not
> recognized or restricted", and a quick search on Google turned up:
> "Troubleshooting and Checking Protocol Handler Performance" at
>
http://msdn.microsoft.com/library/de... formance.asp
> Problem:
> Gatherer log error "URL is excluded because the URL protocol is not
> recognized or restricted"
> Solution:
> Protocol handler registration may have failed. Run regedit to look at
> HKLM\Software\Microsoft\Search\1.0\ProtocolHandler s or the
DllRegisterServer
> function.
> Does this server have both SQL Server and SharePoint installed on it? Is
> this an upgrade from SPPS to SQL Server from WSS?
> Regards,
> John
>
>
> <anonymous@.discussions.microsoft.com> wrote in message
> news:19a801c46f5f$cf3cefb0$a301280a@.phx.gbl...
>