Tuesday, March 27, 2012
Data Extraction Program within SQL Reporting Svcs
Report Pack for SharePoint Portal Server that was recently released. Part of
the VERY limited instructions that comes with the Report Pack states that you
can import your existing SPS log files using the Data Extraction Program
(DEP).
I have tried this a number of times now and the SPS logs will import into
dbSPSReportingStaging with no errors. However, when the application attempts
to move those logs from dbSPSReportingStaging to dbSPSReporting I get an
error message "String or binary data would be truncated" and the statement
terminates without moving the data into dbSPSReporting.
Obviously (to me anyway) there is a field that is not of sufficient length
(or perhaps the wrong type) in dbSPSReporting. Given the fact that this DB is
created using a .sql script written and included in the Report Pack how can I
identify which field is causing the problem and fix it?
Any help is appreciated!
TIAMark Harrison pointed me to the link below which should fix the issue
http://blogs.msdn.com/dinod/archive/2005/08/19/453724.aspx
"Jay" wrote:
> I have installed SQL Reporting Services and have been trying to implement the
> Report Pack for SharePoint Portal Server that was recently released. Part of
> the VERY limited instructions that comes with the Report Pack states that you
> can import your existing SPS log files using the Data Extraction Program
> (DEP).
> I have tried this a number of times now and the SPS logs will import into
> dbSPSReportingStaging with no errors. However, when the application attempts
> to move those logs from dbSPSReportingStaging to dbSPSReporting I get an
> error message "String or binary data would be truncated" and the statement
> terminates without moving the data into dbSPSReporting.
> Obviously (to me anyway) there is a field that is not of sufficient length
> (or perhaps the wrong type) in dbSPSReporting. Given the fact that this DB is
> created using a .sql script written and included in the Report Pack how can I
> identify which field is causing the problem and fix it?
> Any help is appreciated!
> TIA
Thursday, March 22, 2012
Data driven subscription printing problem
I installed the printer delivery sample.When i tried to set up
the data driven subscription with delivery mode as printing to a
specific printer.I am getting error.
Done: 2 processed of 2 total; 2 errors.
When i set it as an email.Its working.I am getting email.I could
successfully set up the printer.I did not get any error.In the log
files i dont see any explanation.Is there any setup we have to tell
for printer delivery also log the information.
Thanks
vkvWhen you say you "successfully set up the printer", under which identity did
you set it up? Under what identity is the subscription job running?
Or do you just mean you "successfully told the Reporting Services
configuration about it in its XML file"? In which case, read my first
paragraph again <g>.
>>.Is there any setup we have to tell
>> for printer delivery also log the information.
Are you seeing anything in the log related to this extension at all (in case
you are looking in the wrong log)?
I looked briefly at the code and it looks like it logs all the time.
>L<
"vamsi" <vamsii@.gmail.com> wrote in message
news:1176861152.048216.29700@.b58g2000hsg.googlegroups.com...
> Hi
> I installed the printer delivery sample.When i tried to set up
> the data driven subscription with delivery mode as printing to a
> specific printer.I am getting error.
> Done: 2 processed of 2 total; 2 errors.
> When i set it as an email.Its working.I am getting email.I could
> successfully set up the printer.I did not get any error.In the log
> files i dont see any explanation.Is there any setup we have to tell
> for printer delivery also log the information.
> Thanks
> vkv
>|||Hi
I did set up the subscription under my username identity.I am
having admin permissions on the report server.It did not generate the
log immediately.It generated after 6 hours.I just saw the log file it
said
Notification f57f14c4-32fa-47eb-84f3-3e75e6aa175e completed.
Success: False, Status: Error: Error writing to log file: Access to
the path 'C:\WINDOWS\system32\PrinterDeliveryLog.txt' is denied.,
DeliveryExtension: Printer Delivery Sample, Report:
I created a text document with this name.The subscription ran
successfully and i am getting 0 errors.I checked it did not print the
report.I saw in the PrinterDeliveryLog in system32,i got this message
04/18/2007 08:54:02
Number of pages: 1046
The printer \\SYSTEMS\PRN295_3 is not currently installed on the
server.: at
Microsoft.Samples.ReportingServices.PrinterDelivery.PrinterDeliveryProvider.PrintReport(Notification
notification, SubscriptionData data)
"SYSTEMS" is the server name of all the printers.PRN295_3 is the
printer name.It is installed on the report server.I added this printer
to the server personally.Anything i have to do regarding installing
the printer.
Thanks
vkv|||It doesn't matter that you have admin permissions on the report server...
Your report subscription job is not running under your identity, probably,
and the printer, while installed on the server, is not accessible to the
identity under which that job is running.
The first thing I would do is check to see who has rights to print to that
printer.
This is a common problem with code running in web server apps FWIW... it's
not something I know about specifically to do with Reporting Services, but
it is a common problem for code running under a service account. Check the
account and check if it has rights to print to that (or any!) printer.
>L<
"vamsi" <vamsii@.gmail.com> wrote in message
news:1176913746.971631.47520@.e65g2000hsc.googlegroups.com...
> Hi
> I did set up the subscription under my username identity.I am
> having admin permissions on the report server.It did not generate the
> log immediately.It generated after 6 hours.I just saw the log file it
> said
> Notification f57f14c4-32fa-47eb-84f3-3e75e6aa175e completed.
> Success: False, Status: Error: Error writing to log file: Access to
> the path 'C:\WINDOWS\system32\PrinterDeliveryLog.txt' is denied.,
> DeliveryExtension: Printer Delivery Sample, Report:
> I created a text document with this name.The subscription ran
> successfully and i am getting 0 errors.I checked it did not print the
> report.I saw in the PrinterDeliveryLog in system32,i got this message
> 04/18/2007 08:54:02
> Number of pages: 1046
> The printer \\SYSTEMS\PRN295_3 is not currently installed on the
> server.: at
> Microsoft.Samples.ReportingServices.PrinterDelivery.PrinterDeliveryProvider.PrintReport(Notification
> notification, SubscriptionData data)
> "SYSTEMS" is the server name of all the printers.PRN295_3 is the
> printer name.It is installed on the report server.I added this printer
> to the server personally.Anything i have to do regarding installing
> the printer.
> Thanks
> vkv
>|||I commented out this part of the code
if (!IsValidPrinter(data.Printer))
throw new Exception("The printer " + data.Printer + " is not currently
installed on the server.");
in PrinterDeliveryProvider.cs and its working for now.I have to check
whether i will get any other problem.It always prints in 8.5 * 11 page
irrespective of the settings we give while subscribing.I have to check
the PrinterDeliveryProvider code.
Thanks
vkv|||Thanks for letting me know... but ...
Take a look at the IsValidPrinter function. It checks
PrinterSettings.InstalledPrinters.
*** THE REASON WHY *** this code is failing to find printers is almost
definitely what I said before... I know it says "InstalledPrinters" but the
identity querying for printers has to have printing permission or it's not
going to "see" the installed printers in the list...
Now take a look at the ValidateUserData stuff -- I think it will show you
why the height and width don't change.
>L<
"vamsi" <vamsii@.gmail.com> wrote in message
news:1177005379.609924.169550@.y80g2000hsf.googlegroups.com...
>I commented out this part of the code
> if (!IsValidPrinter(data.Printer))
> throw new Exception("The printer " + data.Printer + " is not currently
> installed on the server.");
> in PrinterDeliveryProvider.cs and its working for now.I have to check
> whether i will get any other problem.It always prints in 8.5 * 11 page
> irrespective of the settings we give while subscribing.I have to check
> the PrinterDeliveryProvider code.
> Thanks
> vkv
>|||I changed the code in PrinterDeliveryProvider for the printer
settings.Now its printing correctly but its not settings the font size
of the report.Its taking its deafult size.I have to search for that
again.Please let me know if you cam eacross this issue.
Thanks
vkv|||I don't quite understand what you mean. As far as I can see there is no
need for the extension code to set a font size. It is not printing text.
It is printing a page image which is handed to it as a metafile.
deviceInfo = String.Format(
System.Globalization.CultureInfo.InvariantCulture,
@."<DeviceInfo><OutputFormat>{0}</OutputFormat><PageHeight>{1}</PageHeight><PageWidth>{2}</PageWidth></DeviceInfo>",
"emf", pageHeight, pageWidth);
// Render report
m_files = notification.Report.Render("IMAGE", deviceInfo);
The font information all comes from the report as rendered by engine code --
the extension isn't sitting around figuring out line height, etc .
The extension only "sees" an image which it proceeds to deliver to the
printer. Why would it pay attention to the printer settings for font
information? Maybe I'm misunderstanding your question...
>L<
"vamsi" <vamsii@.gmail.com> wrote in message
news:1177021179.164488.167590@.q75g2000hsh.googlegroups.com...
>I changed the code in PrinterDeliveryProvider for the printer
> settings.Now its printing correctly but its not settings the font size
> of the report.Its taking its deafult size.I have to search for that
> again.Please let me know if you cam eacross this issue.
> Thanks
> vkv
>|||I thought the same,But it might not happening with my case.When i
print the report from the reportmanager directly i see the font that i
set.When a sheet is printed from printer example font is different so
content is not complete.
This was the reason behind trying to adjust the font size.
Thanks
vkv|||When you print from the report manager, where are you setting the font?
Are you talking about something in the printer setup or something in the
report?
>L<
"vamsi" <vamsii@.gmail.com> wrote in message
news:1177088551.822758.189490@.y80g2000hsf.googlegroups.com...
>I thought the same,But it might not happening with my case.When i
> print the report from the reportmanager directly i see the font that i
> set.When a sheet is printed from printer example font is different so
> content is not complete.
> This was the reason behind trying to adjust the font size.
> Thanks
> vkv
>|||I am not doing anything.i saw other post.that user also complaining
about the image that is rendering to the report.I dont know wat to do
and how to approach|||>>I am not doing anything.
You said:
>>When i print the report from the reportmanager directly i see the font
>>that i set.
So I asked: Where did you set the font? In the report or the printer
setup?
>>i saw other post.that user also complaining about the image that is
>>rendering to the report
I'm not sure which other post you're referring to, but if it's the "printer
delivery sample" thread, it only confirms what I already told you:
This sample extension is printing from an EMF that they get from the engine,
not rendering text. In no way would the sample code, printing an image, be
handling fonts if it is printing a page image. However, the sample code is
not necessarily sizing the image properly, which might look like a font size
issue.
Look: "sizing the image properly" is a non-trivial task. The sample code
has some code stubbed in to decide whether the printer you want to use can
handle the size of the page that the report has been set to, IOW whether
that page size is *valid* on the printer you want. You have commented out
that code right now, I know. But that validation *has* to be done, and is a
small part of the non-trivial task.
The extension code cannot repaginate. It has to decide what to do with the
rendered pages, which were rendered with a certain page size and -- more
significantly -- a certain height to width ratio.
>>I dont know wat to do and how to approach
To handle this task properly:
We know that the report page is already rendered, with a certain height to
width ratio, by the time the extension gets ahold of it. Now the extension
has to decide how to handle any *difference* between the original aspect
ratio and page size and what is available in the user's specified printer
setup.
There are several options the extension has in this situation, and IMHO it
actually should let the user decide which is the best one to use before
proceeding:
* -- scale the EMF and stretch to exactly fit the available page size and
its aspect ratio, even if it might be inappropriate for the current page
aspect ratio as set by the user's chosen printer
* -- scale the EMF but keep the original aspect ratio, fixing the larger of
the two original dimensions to fit the available space and leaving some
white space on the smaller one
* -- scale the EMF but keep the original aspect ratio, fixing the smaller of
the two original dimensions to fit the available space and clipping off
whatever part of the larger one doesn't fit
* -- don't scale the EMF at all -- meaning sometimes you'll have extra
space, more often the page will get clipped in one or both dimensions, but
the aspect ratio and the original intent of the page, as designed in the
report layout, is preserved with fidelity.
Once you have gone this far down the path, and allowed the user a chance to
decide how to handle the current report, you can then add a bunch of other
possibilities, including printing multiple page images per paper page. (I'm
sure you've seen this option in printer driver options, right? Printing two
pages per page, or four pages per page, or whatever? This is how it works.
You have to do the math a little differently than one page per page, but
it's the same basic problem.)
I haven't actually looked to see which decision about scaling the extension
makes. I don't know if there is any dynamic intelligence in the sample code
to handle best-case by comparing the user page size and the original page
size or if it always makes the same decision.
My point here: to approach the problem properly, think about the sizing and
stretching cases above, and how they might play out in your situation. Look
at the sample code to see how it sends the image to the printer.
When you do, you may find (as I believe) that what is going on has NOTHING
to do with "font size" and EVERYTHING to do with image scaling.
If I'm wrong, and it really *does* have to do with font size, then one has
to ask: where did you set the font size that you say the report manager is
respecting but the extension is not?
>L<
"vamsi" <vamsii@.gmail.com> wrote in message
news:1177105049.732348.209160@.b58g2000hsg.googlegroups.com...
>I am not doing anything.i saw other post.that user also complaining
> about the image that is rendering to the report.I dont know wat to do
> and how to approach
>|||I did send email to your personal account of scanned printouts from
report manager and also the printer delivery print out.I am still
trying to scale the EMF.
Thanks
vkv|||Well, I guess I'm glad you told me because it went right in my spam...
... please don't do this again (anybody) unless I ask you to ...
Since you did it this time: It seems pretty clear from the two PDFs that you
sent that what I'm saying is correct: It is an image scaling problem, not a
font size problem.
I know that you don't want an 8.5 x 11 page. But your PDF from the report
manager *is* 8.5 x 11. (look at the properties) I am not sure what the
original report is designed to be but when you scanned the printout and sent
it to a PDF, somewhere along the line it scaled it to 8.5 x11. Do you
understand what I am saying? Somewhere along the line somebody used an
algorithm similar to what I'm saying you have to do.
But the printer extension sample code doesn't do this same thing. You would
have to do it in an adaptation of that code.
In my last message I told you pretty much what decisions have to be made to
scale an image properly. I can't make the choice for you about which case
or which algorithm fits your needs. Even if you wanted to limit it to one
simple case, that case depends on the relationship of the original page size
to the page size you are looking for.
If I were going to write this production-grade/generically, I would try to
cover at least the 4 cases I described to you, and then allow the user some
scaling options, asking which case they wanted for this report. It's not
something you solve one way for every set of page size ratios.
And I don't think that my existing code would help you very much. It's not
.NET code.
But here is pseudocode to show you how you work out the basic problem:
I suspect the overload for doing the drawing is this one:
public void EnumerateMetafile (
Metafile metafile,
Rectangle destRect,
EnumerateMetafileProc callback
)
... IOW, you have to tell the metafile image where it should go, what space
to fill, even if it is going to get stretched or shrunk. (This is pretty
much what IE and Adobe Reader etc do when they offer a "shrink to fit"
option for printing.)
In the simplest case, if you just want to fill the new page size and you
don't care of the new aspect ratio matches the old one, you just set that
destRec to the size of the user-designated (subscription) page size.
(I will skip the part where you interrogate the current printer to find out
what its actual printable page size is like since most printers don't print
all the way to the boundaries of the paper... Sigh. That part probably
applies to all cases.)
IAC, just setting that rectangle to the new page size is not the only or
best way to do it if you want to preserve the aspect ratio of the original
page.
This is something like showing a widescreen film on 4.3 TV. The one thing
you generally *don't* want to do is fill both dimensions and show the
picture stretched to an incorrect aspect ratio, because it looks silly,
everything is out of proportion. OK?
So, how should the film be shown? You have to decide whether you want to fit
the width and have some extra space at the top and/or bottom, or fit the
height and cut off some on each side, etc. Same goes for a widescreen TV
and a "regular" TV show that is broadcase in 4.3. There are several
possible cases, all of which are relevant here. You have no control: the
original page might be landscape while the new page is portrait or the other
way around, you're looking for the best fit in each situation.
So, how you do it: you can figure out the difference between page sizes
(rendered and subscription page) and the approach you will take when you get
ready to print the first page.
You should see a line that looks like this in the code:
// Load the metafile image for this page
m_metafile = new Metafile(m_currentPageStream);
A metafile image is being loaded for each page. On the first page, when you
start the job, you can interrogate this image for its size.
m_originalWidth = m_metafile.Width
m_originalHeight = m_metafile.Height
... with me so far?
Now you have to do the math. You can compare that image's aspect ratio with
the one your user has provided for the page size they want, in the settings
array (SubscriptionData.PAGEHEIGHT/SubscriptionData.PAGEWIDTH), and make any
necessary adjustments in the destRect.
You could start by trying to fill the new Width completely. You know the
original Width and its relationship to the new subscription page width. The
new height has to be the same percentage of the original
m_metafile.Height -- whether bigger or smaller -- as the new width is of the
original Width. That's how the aspect ratio stays correct.
So now you have a possible new height for your destRect. Is that new height
bigger than the available height of the subscription page? Then try it the
other way around: try filling the Height and seeing if you can get the
Width to fit.
(There are ways to decide which to try first, I'm skipping all that. The
result is the same no matter how smart or dumb you make the code.)
If you can't get both dimensions to fit on the page, try cutting down both
dimensions by some percentage (say, 5%) and try again.
I hope you're starting to see what I'm talking about.
See... ** THEY WROTE A SAMPLE **. It's not production-grade. What else
can I say.
>L<
"vamsi" <vamsii@.gmail.com> wrote in message
news:1177117415.975650.74970@.l77g2000hsb.googlegroups.com...
>I did send email to your personal account of scanned printouts from
> report manager and also the printer delivery print out.I am still
> trying to scale the EMF.
> Thanks
> vkv
>|||Thanks for giving really good suggestions from where i have to
start.My fault for sending the email.
I have to make this printer delivery for only this report,so i can
make any changes which fits this report.Thats atleast good part.I dont
have to write generalize code.For this report i am intended to print
8.5 * 11.
As you suggested earlier on this point
* -- scale the EMF and stretch to exactly fit the available page size
and
its aspect ratio, even if it might be inappropriate for the current
page
aspect ratio as set by the user's chosen printer
-- Scale emf means dealing with resolution ' If it is meant
resolution Metafile resolution properties are read only.
And on the Suggestion
You should see a line that looks like this in the code:
// Load the metafile image for this page
m_metafile = new Metafile(m_currentPageStream);
A metafile image is being loaded for each page. On the first page,
when you
start the job, you can interrogate this image for its size.
m_originalWidth = m_metafile.Width
m_originalHeight = m_metafile.Height
There is no line of code like this,but the kept those lines and found
out that width is 817 and height is 1057.
I changed the dest where it has to print from Point destPoint = new
Point(0, 0); to Point destPoint = new Point(-35, -30); There is
little bit improvement on the both horizontal and vertical positions.
I am thinking the only way to get this right is reduce the
resolution.Am i going in right direction.
You are right that it is only a sample.I should extend to make it
compatible for my purpose.
Thanks for giving replies.
Thanks
vkv|||I changed the function ReportDrawPage and it is working as i wanted.
private void ReportDrawPage(Graphics graphics)
{
if (null == m_currentPageStream || 0 ==m_currentPageStream.Length || null == m_metafile)
return;
lock (this)
{
// Set the metafile delegate.
int width = m_metafile.Width;
int height = m_metafile.Height;
m_delegate = new
Graphics.EnumerateMetafileProc(MetafileCallback);
// Draw in the rectangle
//Point destPoint = new Point(0, 0);
System.Drawing.Rectangle rect = new
System.Drawing.Rectangle(0, 0, width, height);
graphics.EnumerateMetafile(m_metafile, rect,
m_delegate);
// Clean up
m_delegate = null;
}
}
Thanks for your help that you responded all this time.
vkv|||Yup -- that will work for your simple case. I'm glad for you!
The reason I gave you the additional, generic information is to explain why
it is hard to do this, for you and for other people reading. <s>
IOW: I would like to help folks here understand why they didn't "just add
the little bit of extra code to make the sample more robust". The answer is
because it wouldn't be "a little bit of extra code" to do it correctly <g>.
Caveat: I really don't understand why they didn't use the overload of
EnumerateMetafileProc that I suggested and that you have used
successfully -- that *would* have been a "little bit of code" and would have
pointed people in the right direction... following that same little bit of
help from me you did just fine! <s>.
To answer something in your other message -- although resolution of the
*EMF* is readonly, we're not adjusting resolution of the EMF (the source).
We are adjusting the dimensions to which the image is being rendered to the
printer (the target). This might be just another way of saying that we need
to adjust the resolution of the *target* but you don't really need to think
it. I think you now understand this, but I want to make sure everybody
reading does.
Also, yes, there was no line of code like this:
m_originalWidth = m_metafile.Width
m_originalHeight = m_metafile.Height
<<
That was code I was suggesting that you *add* after the line in the code
loading the metafile. You do not need to do it in the non-generic case,
but I was suggesting that if one were writing this generically, one would
take those values when interrogating that first image and save them to
member properties. Then they are available to use in math as required.
There are scenarios in which one has to re-evaluate them again after the
first page (which, again, do not concern you at the moment).
Regards,
>L<
"vamsi" <vamsii@.gmail.com> wrote in message
news:1177369963.637449.95000@.y5g2000hsa.googlegroups.com...
>I changed the function ReportDrawPage and it is working as i wanted.
>
> private void ReportDrawPage(Graphics graphics)
> {
> if (null == m_currentPageStream || 0 ==> m_currentPageStream.Length || null == m_metafile)
> return;
> lock (this)
> {
> // Set the metafile delegate.
> int width = m_metafile.Width;
> int height = m_metafile.Height;
> m_delegate = new
> Graphics.EnumerateMetafileProc(MetafileCallback);
> // Draw in the rectangle
> //Point destPoint = new Point(0, 0);
> System.Drawing.Rectangle rect = new
> System.Drawing.Rectangle(0, 0, width, height);
> graphics.EnumerateMetafile(m_metafile, rect,
> m_delegate);
> // Clean up
> m_delegate = null;
> }
>
> }
>
> Thanks for your help that you responded all this time.
> vkv
>|||On Apr 25, 6:14 am, "Lisa Slater Nicholls" <l...@.spacefold.com> wrote:
> Yup -- that will work for your simple case. I'm glad for you!
> The reason I gave you the additional, generic information is to explain why
> it is hard to do this, for you and for other people reading. <s>
> IOW: I would like to help folks here understand why they didn't "just add
> the little bit of extra code to make the sample more robust". The answer is
> because it wouldn't be "a little bit of extra code" to do it correctly <g>.
> Caveat: I really don't understand why they didn't use the overload of
> EnumerateMetafileProc that I suggested and that you have used
> successfully -- that *would* have been a "little bit of code" and would have
> pointed people in the right direction... following that same little bit of
> help from me you did just fine! <s>.
> To answer something in your other message -- although resolution of the
> *EMF* is readonly, we're not adjusting resolution of theEMF(the source).
> We are adjusting the dimensions to which the image is being rendered to the
> printer (the target). This might be just another way of saying that we need
> to adjust the resolution of the *target* but you don't really need to think
> it. I think you now understand this, but I want to make sure everybody
> reading does.
> Also, yes, there was no line of code like this:
>
> m_originalWidth = m_metafile.Width
> m_originalHeight = m_metafile.Height
> <<
> That was code I was suggesting that you *add* after the line in the code
> loading the metafile. You do not need to do it in the non-generic case,
> but I was suggesting that if one were writing this generically, one would
> take those values when interrogating that first image and save them to
> member properties. Then they are available to use in math as required.
> There are scenarios in which one has to re-evaluate them again after the
> first page (which, again, do not concern you at the moment).
> Regards,
> >L<
> "vamsi" <vam...@.gmail.com> wrote in message
> news:1177369963.637449.95000@.y5g2000hsa.googlegroups.com...
>
> >I changed the function ReportDrawPage and it is working as i wanted.
> > private void ReportDrawPage(Graphics graphics)
> > {
> > if (null == m_currentPageStream || 0 ==> > m_currentPageStream.Length || null == m_metafile)
> > return;
> > lock (this)
> > {
> > // Set the metafile delegate.
> > int width = m_metafile.Width;
> > int height = m_metafile.Height;
> > m_delegate = new
> > Graphics.EnumerateMetafileProc(MetafileCallback);
> > // Draw in the rectangle
> > //Point destPoint = new Point(0, 0);
> > System.Drawing.Rectangle rect = new
> > System.Drawing.Rectangle(0, 0, width, height);
> > graphics.EnumerateMetafile(m_metafile, rect,
> > m_delegate);
> > // Clean up
> > m_delegate = null;
> > }
> > }
> > Thanks for your help that you responded all this time.
> > vkv- Hide quoted text -
> - Show quoted text -
Ha Ha !!!
Wasnt expecting it to be so easy
insted of passing the point pass a rectangle ...
Rectangle destRect = new Rectangle(0, 0, m_metafile.Width ,
m_metafile.Height);
graphics.EnumerateMetafile(m_metafile, destRect, m_delegate);
// the original code in the example is passing a point as aopposed to
the rectangle.
Cheers|||On Apr 21, 5:02 am, vamsi <vam...@.gmail.com> wrote:
> I thought the same,But it might not happening with my case.When i
> print the report from the reportmanager directly i see thefontthat i
> set.When a sheet is printed from printer examplefontis different so
> content is not complete.
> This was the reason behind trying to adjust thefontsize.
> Thanks
> vkv
The Reason for the difference in the font size is because of scaling.
All you need to do is to modify two lines of code.
in the ReportDrawPage method insted of passing a Point object to the
EnumerateMetafile method pass a rectangle as shown below...
private void ReportDrawPage(Graphics graphics)
{
.....
Rectangle destRect = new Rectangle(0, 0, m_metafile.Width ,
m_metafile.Height);
graphics.EnumerateMetafile(m_metafile, destRect, m_delegate);
......
}|||>> // the original code in the example is passing a point as aopposed to
> the rectangle.
Yes, I know. That's why I suggested the overload you used. <g>
I still don't understand why they used the one they did...
>L<
>
<anilrawat@.gmail.com> wrote in message
news:1179713963.079135.68760@.z28g2000prd.googlegroups.com...
> On Apr 25, 6:14 am, "Lisa Slater Nicholls" <l...@.spacefold.com> wrote:
>> Yup -- that will work for your simple case. I'm glad for you!
>> The reason I gave you the additional, generic information is to explain
>> why
>> it is hard to do this, for you and for other people reading. <s>
>> IOW: I would like to help folks here understand why they didn't "just add
>> the little bit of extra code to make the sample more robust". The answer
>> is
>> because it wouldn't be "a little bit of extra code" to do it correctly
>> <g>.
>> Caveat: I really don't understand why they didn't use the overload of
>> EnumerateMetafileProc that I suggested and that you have used
>> successfully -- that *would* have been a "little bit of code" and would
>> have
>> pointed people in the right direction... following that same little bit
>> of
>> help from me you did just fine! <s>.
>> To answer something in your other message -- although resolution of the
>> *EMF* is readonly, we're not adjusting resolution of theEMF(the source).
>> We are adjusting the dimensions to which the image is being rendered to
>> the
>> printer (the target). This might be just another way of saying that we
>> need
>> to adjust the resolution of the *target* but you don't really need to
>> think
>> it. I think you now understand this, but I want to make sure everybody
>> reading does.
>> Also, yes, there was no line of code like this:
>>
>> m_originalWidth = m_metafile.Width
>> m_originalHeight = m_metafile.Height
>> <<
>> That was code I was suggesting that you *add* after the line in the code
>> loading the metafile. You do not need to do it in the non-generic case,
>> but I was suggesting that if one were writing this generically, one
>> would
>> take those values when interrogating that first image and save them to
>> member properties. Then they are available to use in math as required.
>> There are scenarios in which one has to re-evaluate them again after the
>> first page (which, again, do not concern you at the moment).
>> Regards,
>> >L<
>> "vamsi" <vam...@.gmail.com> wrote in message
>> news:1177369963.637449.95000@.y5g2000hsa.googlegroups.com...
>>
>> >I changed the function ReportDrawPage and it is working as i wanted.
>> > private void ReportDrawPage(Graphics graphics)
>> > {
>> > if (null == m_currentPageStream || 0 ==>> > m_currentPageStream.Length || null == m_metafile)
>> > return;
>> > lock (this)
>> > {
>> > // Set the metafile delegate.
>> > int width = m_metafile.Width;
>> > int height = m_metafile.Height;
>> > m_delegate = new
>> > Graphics.EnumerateMetafileProc(MetafileCallback);
>> > // Draw in the rectangle
>> > //Point destPoint = new Point(0, 0);
>> > System.Drawing.Rectangle rect = new
>> > System.Drawing.Rectangle(0, 0, width, height);
>> > graphics.EnumerateMetafile(m_metafile, rect,
>> > m_delegate);
>> > // Clean up
>> > m_delegate = null;
>> > }
>> > }
>> > Thanks for your help that you responded all this time.
>> > vkv- Hide quoted text -
>> - Show quoted text -
>
> Ha Ha !!!
> Wasnt expecting it to be so easy
> insted of passing the point pass a rectangle ...
> Rectangle destRect = new Rectangle(0, 0, m_metafile.Width ,
> m_metafile.Height);
> graphics.EnumerateMetafile(m_metafile, destRect, m_delegate);
> // the original code in the example is passing a point as aopposed to
> the rectangle.
> Cheers
>
Sunday, March 11, 2012
Data Conversion Errors on Excel Import into existing table
Recently installed Sql Server 2005 client and am now attempting to import data from a spreadsheet into an existing table. This works fine with Sql Server 2000 but I am getting data conversion truncation errors that stop the process when this runs using import utility in Sql Server 2005.
Any help would be appreciated.
More information needed.
Why is it failing? What does the error message say?
You will need to open up the package and edit it to do the conversions that you require.
-Jamie
Data Connection
So after a few hours of banging my head against my computer, here I am. :)
Backstory: A few weeks ago I installed web matrix and MSDE Rel A so I could create some .NET pages from my local machine, connect to a remote SQL Server 2000 database, and then post the .NET pages on the web server. All went well, I could connect to the datasource it brought up the table column names, everything was perfectly working (should've been my first hint to leave well enough alone). Well today, I think, "hey you know I want to give this new Visual Studio 2005 Express Edition a try". So I install it. I thought that if web matrix was that simple to connect, create and post "surely" VSE would be too, but with more features. I also read how I should go ahead and install SQL Server express and SQL Server Managment Studio Express, so I did.
So I go to create a datasource in VSE, but VSE had other plans. An error message popped up. Something to the effect, "An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be cuased by the fact that under the default settings SQL Server does not allow remote connections..." I noticed that it said something about SQL Server 2005 so I figured I'd need to change that so I used the Microsoft SQL Server (OLE DB). It returned the error "[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied". I flipped back over to web matrix and now it doesn't work either. I have tried referencing the server by servername\db_name and ip address as well. All result in the same.
Any thoughts on how to get me going?
Try .\SQLEXPRESSWednesday, March 7, 2012
Data base mirroring fail over clients redirects
I have recently installed and configured SQL 2005 SE with database mirroring
configured with high safety with automatic failover synchronous mode.
My question is (I probably missed the principle idea) in case of failover
occurred how do the clients redirect to the second node transparently.
Thanks in advanced.
Tal shalom
You must specify the initial principal server and database in the
connection string and the failover partner server.
Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial
Catalog=myDataBase;Integrated Security=True;
"Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
news:65B28837-DFDB-45A6-858E-F73D291E86F1@.microsoft.com...
> Hello,
> I have recently installed and configured SQL 2005 SE with database
> mirroring
> configured with high safety with automatic failover synchronous mode.
> My question is (I probably missed the principle idea) in case of failover
> occurred how do the clients redirect to the second node transparently.
> Thanks in advanced.
|||Shalom Uri
Thanks for the answer, will it be the right option to use also Microsoft SQL
Server Native Client and choosing mirror server will it achieve the same
results.
Thanks
"Uri Dimant" wrote:
> Tal shalom
> You must specify the initial principal server and database in the
> connection string and the failover partner server.
> Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial
> Catalog=myDataBase;Integrated Security=True;
>
> "Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
> news:65B28837-DFDB-45A6-858E-F73D291E86F1@.microsoft.com...
>
>
|||Hi Tal
Yes, I forgot to mention that you have to use ADO.NET or the SQL Native
Client .
"Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
news:26F6792F-0750-4E87-B438-A602908DA166@.microsoft.com...[vbcol=seagreen]
> Shalom Uri
> Thanks for the answer, will it be the right option to use also Microsoft
> SQL
> Server Native Client and choosing mirror server will it achieve the same
> results.
> Thanks
>
> "Uri Dimant" wrote:
|||thanks
cheers
"Uri Dimant" wrote:
> Hi Tal
> Yes, I forgot to mention that you have to use ADO.NET or the SQL Native
> Client .
>
>
> "Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
> news:26F6792F-0750-4E87-B438-A602908DA166@.microsoft.com...
>
>
Data Archiving...sounds easy but how to approach.
What is the best way to achieve the following mechanism.
My product has a database, which will be installed at my client site.
as we all know database is something which will grow tremendously.
Now i am planning to come out with a Data archiving facility in such a way that
Yearly data will be backed up and will be maintained in a separate machine.
The data that was backed up will be removed from the current machine's database.Ofcourse
there will be a mchanism provided through which i can transfer data from offline database to online database.
Now, please throw u r thoughts on how to approach this problem...
My database is in SQL Server.
Thanks and regards
saiHi Sai -
I don't know if this is the best way to accomplish this task -
but i set up a job that runs each day at 4:30am (after backup is completed)
that simply deletes all records that are 365 days old in the tables
that i want to keep trimmed -
I do have a datetime stamp on each table that is populated when the record is added to the table -
hope this helps -
take care
tony
Saturday, February 25, 2012
Data Acess aplication block __How to use it on server without Microsoft
As per my earlier conversation with Ciaran (thx for reply) I have
installed the MS APplication block on the server , when i ran Build
Enterprise Library file and Install Services from (batch files )
programme files menu it was asking for visual studio 2003 , I have only
.net framework on the server how can i use the MS application block
data access library on my server plz help...
Mukesh Agarwal
mukesh.nitb@.gmail.com
Delhi India
Ciaran O''Donnell wrote:
> The error you are getting is because the enterprise library wants to
write events to the event log and setting this up requires registry
permissions. You need to installutil the dlls for the enterprise library
(this is covered in the docs somewhere). The reason it is writing to the
event log is because the connection failed. If you setup the event log
access correctly then you will have an eventlog entry telling you why
the connection failed.
>
> HTH
>
> Ciaran O'Donnell
>
> "Mukesh" wrote:
>
>> Hi
>>
>> I have Microsoft Enterprise Library 2005 installed on my local system.
>> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
Server 2000.
>>
>> I am developing a web application in which i am using data Access
Application Block for data access.
>>
>> I have a remote web n data server with asp.net 1.1 support
>>
>> the application is working fine here on the local server(web & data).
>>
>> when i change the data server path to the remote server it also
working fine but
>> When I uploaded the application on the remote server n tested there
it gives me the following err
>>
>>
>> ex.message was
>>
>>
>> >>The type initializer for
>>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
>>threw an exception.
>>
>> ex.Source was
>>
>> ..........Microsoft.Practices.EnterpriseLibrary.Data
>>
>> ex.trace was
>>
>> at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
command) at property.m4.Button2_Click(Object sender, EventArgs e)
>>
>>
>> Plz help me why this is happening.........
>>
>> Mukesh Kumar agarwal
>> Delhi
>> India
>>
>>
>>
>>
>>
>>The build file calls devenv.exe, which is Visual Studio 2003. You best
option now is a command line compilation of the library. Follow the docs on
the csc.exe (C#) or vbc.exe (VB.NET) compilers.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************************************************
Think outside of the box!
*************************************************
"Mukesh" <efextra@.newsgroups.nospam> wrote in message
news:45056076.3060606@.newsgroups.nospam...
> Hi all
> As per my earlier conversation with Ciaran (thx for reply) I have
> installed the MS APplication block on the server , when i ran Build
> Enterprise Library file and Install Services from (batch files ) programme
> files menu it was asking for visual studio 2003 , I have only .net
> framework on the server how can i use the MS application block data access
> library on my server plz help...
> Mukesh Agarwal
> mukesh.nitb@.gmail.com
> Delhi India
>
> Ciaran O''Donnell wrote:
> > The error you are getting is because the enterprise library wants to
> write events to the event log and setting this up requires registry
> permissions. You need to installutil the dlls for the enterprise library
> (this is covered in the docs somewhere). The reason it is writing to the
> event log is because the connection failed. If you setup the event log
> access correctly then you will have an eventlog entry telling you why the
> connection failed.
> >
> > HTH
> >
> > Ciaran O'Donnell
> >
> > "Mukesh" wrote:
> >
> >> Hi
> >>
> >> I have Microsoft Enterprise Library 2005 installed on my local
> >> system.
> >> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> >>
> >> I am developing a web application in which i am using data Access
> Application Block for data access.
> >>
> >> I have a remote web n data server with asp.net 1.1 support
> >>
> >> the application is working fine here on the local server(web & data).
> >>
> >> when i change the data server path to the remote server it also
> working fine but
> >> When I uploaded the application on the remote server n tested there
> it gives me the following err
> >>
> >>
> >> ex.message was
> >>
> >>
> >> >>The type initializer for
> >>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
> >>threw an exception.
> >>
> >> ex.Source was
> >>
> >> ..........Microsoft.Practices.EnterpriseLibrary.Data
> >>
> >> ex.trace was
> >>
> >> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
> >>
> >>
> >> Plz help me why this is happening.........
> >>
> >> Mukesh Kumar agarwal
> >> Delhi
> >> India
> >>
> >>
> >>
> >>
> >>
> >>|||I didnt mean install the enterprise library with the MSI file.
I mean't for each dll in the EL you use:
call InstallUtil.exe passing in the name of the dll. This will invoke the
custominstaller classes inside the dll's to register them selves in teh event
log and things.
Ciaran O'Donnell
"Mukesh" wrote:
> Hi all
> As per my earlier conversation with Ciaran (thx for reply) I have
> installed the MS APplication block on the server , when i ran Build
> Enterprise Library file and Install Services from (batch files )
> programme files menu it was asking for visual studio 2003 , I have only
> .net framework on the server how can i use the MS application block
> data access library on my server plz help...
> Mukesh Agarwal
> mukesh.nitb@.gmail.com
> Delhi India
>
> Ciaran O''Donnell wrote:
> > The error you are getting is because the enterprise library wants to
> write events to the event log and setting this up requires registry
> permissions. You need to installutil the dlls for the enterprise library
> (this is covered in the docs somewhere). The reason it is writing to the
> event log is because the connection failed. If you setup the event log
> access correctly then you will have an eventlog entry telling you why
> the connection failed.
> >
> > HTH
> >
> > Ciaran O'Donnell
> >
> > "Mukesh" wrote:
> >
> >> Hi
> >>
> >> I have Microsoft Enterprise Library 2005 installed on my local system.
> >> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> >>
> >> I am developing a web application in which i am using data Access
> Application Block for data access.
> >>
> >> I have a remote web n data server with asp.net 1.1 support
> >>
> >> the application is working fine here on the local server(web & data).
> >>
> >> when i change the data server path to the remote server it also
> working fine but
> >> When I uploaded the application on the remote server n tested there
> it gives me the following err
> >>
> >>
> >> ex.message was
> >>
> >>
> >> >>The type initializer for
> >>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
> >>threw an exception.
> >>
> >> ex.Source was
> >>
> >> ..........Microsoft.Practices.EnterpriseLibrary.Data
> >>
> >> ex.trace was
> >>
> >> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
> >>
> >>
> >> Plz help me why this is happening.........
> >>
> >> Mukesh Kumar agarwal
> >> Delhi
> >> India
> >>
> >>
> >>
> >>
> >>
> >>
>|||Install the .msi on a development machine with VS2003.
Look at the .bat files.
You need to not find the compile code (csc or dev.exe), but rather the code
that installs the services.
You need the rights to install services , especially on a Server Machine.
Make sure the framework (free download) is installed on the server also.
"Mukesh" <efextra@.newsgroups.nospam> wrote in message
news:45056076.3060606@.newsgroups.nospam...
> Hi all
> As per my earlier conversation with Ciaran (thx for reply) I have
> installed the MS APplication block on the server , when i ran Build
> Enterprise Library file and Install Services from (batch files )
> programme files menu it was asking for visual studio 2003 , I have only
> .net framework on the server how can i use the MS application block
> data access library on my server plz help...
> Mukesh Agarwal
> mukesh.nitb@.gmail.com
> Delhi India
>
> Ciaran O''Donnell wrote:
> > The error you are getting is because the enterprise library wants to
> write events to the event log and setting this up requires registry
> permissions. You need to installutil the dlls for the enterprise library
> (this is covered in the docs somewhere). The reason it is writing to the
> event log is because the connection failed. If you setup the event log
> access correctly then you will have an eventlog entry telling you why
> the connection failed.
> >
> > HTH
> >
> > Ciaran O'Donnell
> >
> > "Mukesh" wrote:
> >
> >> Hi
> >>
> >> I have Microsoft Enterprise Library 2005 installed on my local
system.
> >> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> >>
> >> I am developing a web application in which i am using data Access
> Application Block for data access.
> >>
> >> I have a remote web n data server with asp.net 1.1 support
> >>
> >> the application is working fine here on the local server(web & data).
> >>
> >> when i change the data server path to the remote server it also
> working fine but
> >> When I uploaded the application on the remote server n tested there
> it gives me the following err
> >>
> >>
> >> ex.message was
> >>
> >>
> >> >>The type initializer for
>>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnect
ionFailedEvent"
> >>threw an exception.
> >>
> >> ex.Source was
> >>
> >> ..........Microsoft.Practices.EnterpriseLibrary.Data
> >>
> >> ex.trace was
> >>
> >> at
>
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFai
ledEvent.Fire(String
> connectionString) at
>
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentati
onFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
>
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandW
rapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
> >>
> >>
> >> Plz help me why this is happening.........
> >>
> >> Mukesh Kumar agarwal
> >> Delhi
> >> India
> >>
> >>
> >>
> >>
> >>
> >>|||Dear Mukesh,
I am interested in this issue. Would you mind letting me know the result of
the suggestions? If you need further assistance, feel free to let me
know. I will be more than happy to be of assistance.
Have a great day!
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
Data Acess aplication block
I have Microsoft Enterprise Library 2005 installed on my local system.
I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
Server 2000.
I am developing a web application in which i am using data Access
Application Block for data access.
I have a remote web n data server with asp.net 1.1 support
the application is working fine here on the local server(web & data).
when i change the data server path to the remote server it also working
fine but
When I uploaded the application on the remote server n tested there it
gives me the following err
ex.message was
[vbcol=seagreen]
ex.Source was
.........Microsoft.Practices.EnterpriseLibrary.Data
ex.trace was
at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFai
ledEvent.Fire(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentati
onFacade.ConnectionFailed(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandW
rapper
command) at property.m4.Button2_Click(Object sender, EventArgs e)
Plz help me why this is happening.........
Mukesh Kumar agarwal
Delhi
IndiaMukesh,
Are you sure that the user that ASP.NET is running under has access to
the database you are trying to reach? It seems as if this is an error on
connecting.
Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- mvp@.spam.guard.caspershouse.com
"Mukesh" <efextra@.newsgroups.nospam> wrote in message
news:u6JBICB1GHA.4264@.TK2MSFTNGP05.phx.gbl...
> Hi
> I have Microsoft Enterprise Library 2005 installed on my local system.
> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> I am developing a web application in which i am using data Access
> Application Block for data access.
> I have a remote web n data server with asp.net 1.1 support
> the application is working fine here on the local server(web & data).
> when i change the data server path to the remote server it also working
> fine but
> When I uploaded the application on the remote server n tested there it
> gives me the following err
>
> ex.message was
>
> ex.Source was
> .........Microsoft.Practices.EnterpriseLibrary.Data
> ex.trace was
> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionF
ailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumenta
tionFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBComman
dWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>
> Plz help me why this is happening.........
> Mukesh Kumar agarwal
> Delhi
> India
>
>
>|||The error you are getting is because the enterprise library wants to write
events to the event log and setting this up requires registry permissions.
You need to installutil the dlls for the enterprise library (this is covered
in the docs somewhere). The reason it is writing to the event log is because
the connection failed. If you setup the event log access correctly then you
will have an eventlog entry telling you why the connection failed.
HTH
Ciaran O'Donnell
"Mukesh" wrote:
> Hi
> I have Microsoft Enterprise Library 2005 installed on my local system.
> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> I am developing a web application in which i am using data Access
> Application Block for data access.
> I have a remote web n data server with asp.net 1.1 support
> the application is working fine here on the local server(web & data).
> when i change the data server path to the remote server it also working
> fine but
> When I uploaded the application on the remote server n tested there it
> gives me the following err
>
> ex.message was
>
> ex.Source was
> ..........Microsoft.Practices.EnterpriseLibrary.Data
> ex.trace was
> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionF
ailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumenta
tionFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBComman
dWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>
> Plz help me why this is happening.........
> Mukesh Kumar agarwal
> Delhi
> India
>
>
>
Data Acess aplication block
I have Microsoft Enterprise Library 2005 installed on my local system.
I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
Server 2000.
I am developing a web application in which i am using data Access
Application Block for data access.
I have a remote web n data server with asp.net 1.1 support
the application is working fine here on the local server(web & data).
when i change the data server path to the remote server it also working
fine but
When I uploaded the application on the remote server n tested there it
gives me the following err
ex.message was
>>The type initializer for
>>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
>>threw an exception.
ex.Source was
.........Microsoft.Practices.EnterpriseLibrary.Data
ex.trace was
at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
command) at property.m4.Button2_Click(Object sender, EventArgs e)
Plz help me why this is happening.........
Mukesh Kumar agarwal
Delhi
IndiaMukesh,
Are you sure that the user that ASP.NET is running under has access to
the database you are trying to reach? It seems as if this is an error on
connecting.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@.spam.guard.caspershouse.com
"Mukesh" <efextra@.newsgroups.nospam> wrote in message
news:u6JBICB1GHA.4264@.TK2MSFTNGP05.phx.gbl...
> Hi
> I have Microsoft Enterprise Library 2005 installed on my local system.
> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> I am developing a web application in which i am using data Access
> Application Block for data access.
> I have a remote web n data server with asp.net 1.1 support
> the application is working fine here on the local server(web & data).
> when i change the data server path to the remote server it also working
> fine but
> When I uploaded the application on the remote server n tested there it
> gives me the following err
>
> ex.message was
>
> >>The type initializer for
> >>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
> >>threw an exception.
> ex.Source was
> .........Microsoft.Practices.EnterpriseLibrary.Data
> ex.trace was
> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>
> Plz help me why this is happening.........
> Mukesh Kumar agarwal
> Delhi
> India
>
>
>|||The error you are getting is because the enterprise library wants to write
events to the event log and setting this up requires registry permissions.
You need to installutil the dlls for the enterprise library (this is covered
in the docs somewhere). The reason it is writing to the event log is because
the connection failed. If you setup the event log access correctly then you
will have an eventlog entry telling you why the connection failed.
HTH
Ciaran O'Donnell
"Mukesh" wrote:
> Hi
> I have Microsoft Enterprise Library 2005 installed on my local system.
> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> I am developing a web application in which i am using data Access
> Application Block for data access.
> I have a remote web n data server with asp.net 1.1 support
> the application is working fine here on the local server(web & data).
> when i change the data server path to the remote server it also working
> fine but
> When I uploaded the application on the remote server n tested there it
> gives me the following err
>
> ex.message was
>
> >>The type initializer for
> >>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
> >>threw an exception.
> ex.Source was
> ..........Microsoft.Practices.EnterpriseLibrary.Data
> ex.trace was
> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>
> Plz help me why this is happening.........
> Mukesh Kumar agarwal
> Delhi
> India
>
>
>|||Hi all
As per my earlier conversation with Ciaran (thx for reply) I have
installed the MS APplication block on the server , when i ran Build
Enterprise Library file and Install Services from (batch files )
programme files menu it was asking for visual studio 2003 , I have only
.net framework on the server how can i use the MS application block
data access library on my server plz help...
Mukesh Agarwal
mukesh.nitb@.gmail.com
Delhi India
Ciaran O''Donnell wrote:
> The error you are getting is because the enterprise library wants to write
> events to the event log and setting this up requires registry permissions.
> You need to installutil the dlls for the enterprise library (this is covered
> in the docs somewhere). The reason it is writing to the event log is because
> the connection failed. If you setup the event log access correctly then you
> will have an eventlog entry telling you why the connection failed.
> HTH
> Ciaran O'Donnell
> "Mukesh" wrote:
>> Hi
>> I have Microsoft Enterprise Library 2005 installed on my local system.
>> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
>> Server 2000.
>> I am developing a web application in which i am using data Access
>> Application Block for data access.
>> I have a remote web n data server with asp.net 1.1 support
>> the application is working fine here on the local server(web & data).
>> when i change the data server path to the remote server it also working
>> fine but
>> When I uploaded the application on the remote server n tested there it
>> gives me the following err
>>
>> ex.message was
>>
>> >>The type initializer for
>> >>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
>> >>threw an exception.
>> ex.Source was
>> ..........Microsoft.Practices.EnterpriseLibrary.Data
>> ex.trace was
>> at
>> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
>> connectionString) at
>> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
>> connectionString) at
>> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
>> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
>> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>>
>> Plz help me why this is happening.........
>> Mukesh Kumar agarwal
>> Delhi
>> India
>>
>>
>>|||Hello Mukesh,
As for the installation of instrumentation servcie of enterprise library
2005, I've posted some information from the enterprise lib's product
team(in your another duplicated thread in the
microsoft.public.dotnet.languages.csharp newsgroup) which include:
** how disable instrumentation of enterprise library (through custom build)
when deploy them to product environment.
** how to install the instrumentation services without vs 2003
installed(use the installUtil.exe in .net framework utilities):
For your convenience, I've pasted my reply in that thread below:
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
=============================================Hi Mukesh,
As for the Enterprise Library(2005) for .net framework 1.1, the
instrumentation services does need to be installed separately. And the
"install services" bat file does require the VS 2003 IDE installed on the
machine. Actually this is because instrumetation feature is mainly used in
development environment. For production environment, generally we do not
use them and can disable the setting at compilation time(through some build
flags).
Therefore, for your scenario, you can consider the following options:
1. Build a product version of the enterprise library which disable the
instrumentation in the build options(some conditional compile variables).
2. Instead of using the "Install Services" bat file, use the
InstallUtil.exe utility(shipped with .net framework 1.1 rather than vs
2003) to register the instrumentation service against each enterprise
library assembly (you will use in your application).
Here is a blog article from the product manager of enterprise library
(pattern&practice team) which has provide a complete description on the
instrumentation services of Enterprise library 2005(.net 1.1) and how to
disable it in custom build or install the service without VS 2003 IDE:
#Instrumentation in Enterprise Library
http://blogs.msdn.com/tomholl/archive/2005/02/18/376187.aspx
Hope this helps.
Sincerely,
Steven Cheng
===============================================================
Friday, February 24, 2012
Damn! Can not have it to work!
I would appreciate any advise.
pls refer this,
http://www.mcse.ms/message2008943.html they have solved reinstalling the workstation components
http://fabdata.wordpress.com/2007/03/24/object-reference-not-set-to-an-instance-of-an-object-sqleditors/ also this one
|||Deepak Rangarajan,Unfortunately, that didn't work for me. I uninstalled workstation components, even nativeclient. restarted an installed them again. All the same - can not cerate table, can not create view, can not connection to databese in VS.
Friday, February 17, 2012
D.B. Maintenance
I am new to SQL Server. I'm running the initial install of SQL Server 2005 (no SP are installed, ver: 9.00.1399). I have not done any maintenance on my d.b since it's inception (about 3 months ago) and I'm concerned. It seems to be excessively large and I'm not sure about it's integrity. I tried to do some maintenance using the maintenance plan wizard. First of all, what is the best and easiest way to do periodic maintenance on the d.b. (i.e. reindexing, compacting, etc).? Secondly, in trying to use the maintenance plan wizard it failed in the end with the following:
Saving maintenance plan failed:
one or mor arguments are invalid
I'm at a loss as to what to do first. My Windows OS is Windows Server 2003 Standard SP2 completely updated as of today.
I was going to try and upgrade to SQL Server SP2 but that's a project and I'm not sure it will solve anything.
Any help would be greatly appreciated.
First point is to test and upgrade to SP2 in order to get all bug fixes for Maintenance plans.|||First, you really should backup all of your databases and backup logs for all databases that are not in simple recovery. And do that right away. Then run DBCCs as soon as you can on all databases. There is no need to regularly run any "compacting". You want to size your data and log files to be the appropriate size as needed for daily operations and maintenance and that's it. In terms of reindexing, you want to check for fragmentation and then determine which reindexing operation is appropriate and proceed from there.
You'll probably have to mess with this for a bit to clean things up if you haven't done anything in 3 months - I hope it isn't a production server. Being that you may not have looked at much on that box, you would also want to go through your SQL error logs and the windows event logs to see if you have any other issues on the server that may need your attention.
No one can tell you the best way to do your maintenance as that has some dependencies on your system, the business needs, etc. A good place to start is by going through the System Administration chapter of the Operations Guide (it was written for 2000 but much of it applies to 2005) to get an idea of what all you should be doing and then after you define what you need to do you can explore how you will do it:
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlops4.mspx
-Sue
CXPACKET, NETWORKIO, PAGELATCH_EX on server
1. You've been blocked
2. Too many rows to return and the bottleneck is network and your workstation memory|||yes, i went home. :)
the query that ran for 18 hours was an update, and would have affected fewer than 300k records, which is not an issue when running on my local instance of sql.
there are no deadlocks for any of my processes; just the wait types.|||Can you post the query and the table(s) DDL?|||I've also had this kind of issue on a multiprocessor system. In my case, the update/select just took a *very* long time (but it did finish), while sysprocesses was throwing cxpackets and all that. Sometimes I could rewrite the query, in others I just had to wait.
Next to that: I found that sometimes it helps a lot to recreate the indices of a table. I found this out when it took 15 minutes to return on a simple query. Considering the query, I thought it took way too long. Showplan indicated a full table scan, it didn't use an index while I had a perfect index for that query. Hinting didn't help. So, I reindexed. After that, the query started using the index and voila... just a sec.