Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Thursday, March 29, 2012

Exec Stored Procedure from command line?

Is it possible to execute a stored proc form the DOS command Line?Hi,
Yes , you could use the command line utility OSQL or ISQL to do execute a
procedure / tSQL from command line.
OSQL -Usa -Sserver -Ppassword -Qmaster..sp_help -oc:\result.txt'
Thanks
Hari
MCDBA
"Steve" <streesh@.bellsouth.net> wrote in message
news:zJ_0d.115942$0o5.2550@.bignews1.bellsouth.net...
> Is it possible to execute a stored proc form the DOS command Line?
>sql

Exec Stored Procedure from command line?

Is it possible to execute a stored proc form the DOS command Line?
Hi,
Yes , you could use the command line utility OSQL or ISQL to do execute a
procedure / tSQL from command line.
OSQL -Usa -Sserver -Ppassword -Qmaster..sp_help -oc:\result.txt'
Thanks
Hari
MCDBA
"Steve" <streesh@.bellsouth.net> wrote in message
news:zJ_0d.115942$0o5.2550@.bignews1.bellsouth.net. ..
> Is it possible to execute a stored proc form the DOS command Line?
>

Monday, March 19, 2012

exclude a field from a wildcard search (was "A simple question! (heeelp)")

Hey guys, i'm new in SQL and i have a very enervating problem.
I have a form and with some fields.I want users to be able to write just a part of a word in order to search for it (except the first field) .So,as you can see in the querie below i have put the "%" symbol as i know in all fields except tha first one.
So,this querie works only for the first field. If i put the "%" in the first field too the all the fields are ok.
The point is that I don't want the first field to search that way (with "%")...What should i do?
Thanks in advance!


strQ = "SELECT * FROM CustInf WHERE CustID LIKE '" & Request.Form.Item("CustID") & "' and "
strQ = strQ & " Surname LIKE '%" & Request.Form.Item("surname") & "%' and"
strQ = strQ & " Name LIKE '%" & Request.Form.Item("name") & "%' and"
strQ = strQ & " IdentityNo LIKE '%" & Request.Form.Item("IdentityNo") & "%' and"
strQ = strQ & " Address LIKE '%" & Request.Form.Item("Address") & "%' and"
strQ = strQ & " Area LIKE '%" & Request.Form.Item("Area") & "%' and"
strQ = strQ & " Zip LIKE '%" & Request.Form.Item("Zip") & "%' and"
strQ = strQ & " PhoneNo LIKE '%" & Request.Form.Item("PhoneNo") & "%' and"
strQ = strQ & " CellNo LIKE '%" & Request.Form.Item("CellNo") & "%' and"
strQ = strQ & " Email LIKE '%" & Request.Form.Item("Email") & "%' and"
strQ = strQ & " AddrNo LIKE '%" & Request.Form.Item("AddrNo") & "%';"Rather than put every column in the query you should perhaps consider testing if the requestform value has a value in. it is pointless including columns in the where clause if your setting will return all / any rows already.

eg ' not knowing the language you are using, but guessing at VB or one of its realtives...

strQ = "SELECT * FROM CustInf WHERE CustID LIKE '" & Request.Form.Item("CustID")
if len(request.form.item("surname"))>0 then
strQ = strQ & " AND Surname LIKE '%" & Request.Form.Item("surname") & "%'"
endif
if len(request.form.item("name"))>0 then
strQ = strQ & " AND Name LIKE '%" & Request.Form.Item("name") & "%'"
endif

etc.....

your code as written suggests it is expecting the user to place a value in each and every setting. You also might consider whether you are looking for an 'AND' or an 'OR' constraint ie are you looking for every occurance of Surname=Smith AND name=John or every row containing some with a Surname=Smith OR name=John
HTH|||I use "and" cause i want the search function to operate if i have fill in one or more fields.But the problem it's not there.This works fine.|||And somethings else

how can i see the results of COUNT?

strQ = "SELECT COUNT(CustID)FROM Movies WHERE CustID is not NULL"

P.S: I use vbscript and javascript|||And somethings else

how can i see the results of COUNT?

strQ = "SELECT COUNT(CustID)FROM Movies WHERE CustID is not NULL"

P.S: I use vbscript and javascript

Ok i found that (expr1000)!!!!

Monday, March 12, 2012

Excessively long string

On my form I have a web control that shows my report services report. When I
click on the printer button I get the error "An error has occurred trying to
get the current window.", then the next error, "A Runtime Error has occurred.
Do you wish to Debug? Line: 25 Error: Marshaler restriction: Excessively long
string."Hello Mike,
Before we go further on this issue, I'd like to know which web control you
use to show reports? Is it Web browser control? Does the issue occurs on
different reports? If you use a simple report with some textboxes, can you
reproduce the issue? Do you have RS 2005 sp1 installed?
Based on my research, you may have encountered the following known issue
913771 FIX: You may receive an error message when you try to print a SQL
Server
2005 Reporting Services report from a WebBrowser control
<http://support.microsoft.com/default.aspx?scid=kb;EN-US;913771>
This issue is fixed in SRS 2005 sp1. If you did not have applied sp1,
please go to the following link to get it
http://www.microsoft.com/downloads/details.aspx?FamilyId=CB6C71EA-D649-47FF-
9176-E7CAC58FD4BC
If you need any further help, please feel free to let's know. Thank you!
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||SP fixed it. Thanks.
"Peter Yang [MSFT]" wrote:
> Hello Mike,
> Before we go further on this issue, I'd like to know which web control you
> use to show reports? Is it Web browser control? Does the issue occurs on
> different reports? If you use a simple report with some textboxes, can you
> reproduce the issue? Do you have RS 2005 sp1 installed?
> Based on my research, you may have encountered the following known issue
>
> 913771 FIX: You may receive an error message when you try to print a SQL
> Server
> 2005 Reporting Services report from a WebBrowser control
> <http://support.microsoft.com/default.aspx?scid=kb;EN-US;913771>
> This issue is fixed in SRS 2005 sp1. If you did not have applied sp1,
> please go to the following link to get it
> http://www.microsoft.com/downloads/details.aspx?FamilyId=CB6C71EA-D649-47FF-
> 9176-E7CAC58FD4BC
> If you need any further help, please feel free to let's know. Thank you!
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications
> <http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> <http://msdn.microsoft.com/subscriptions/support/default.aspx>.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>

Friday, February 24, 2012

Excel versus PDF Rendering

We have a report that's rendered to a printable form over 1000 times
in a span of 2 hours. We're in the process of replacing the server
because this workload has been hammering the machine and running the
RS services out of memory. I've added a metering component (the page
that redirects users to the report checks to see how many reports are
running and holds them at that page if it's over a set number). My
question is... for a fairly plain report (about 8 pages, mostly just
gridlines and shaded areas, with column and row header text. No
embedded images), which rendering performs better - PDF or Excel?
I've done some un-scientific research, and found that the CPU and
clock-time for each is pretty consistent, but that PDF might require
less memory per rendering report? Any feedback on this would be very
helpful.With SP1 of Reporting, the Algoritm for PDF Render are improved.
Con el Service Pack 1, el algoritmo de renderizacion de PDF fue mejorado.
John Bocachica
Colombia
"TShay" wrote:
> We have a report that's rendered to a printable form over 1000 times
> in a span of 2 hours. We're in the process of replacing the server
> because this workload has been hammering the machine and running the
> RS services out of memory. I've added a metering component (the page
> that redirects users to the report checks to see how many reports are
> running and holds them at that page if it's over a set number). My
> question is... for a fairly plain report (about 8 pages, mostly just
> gridlines and shaded areas, with column and row header text. No
> embedded images), which rendering performs better - PDF or Excel?
> I've done some un-scientific research, and found that the CPU and
> clock-time for each is pretty consistent, but that PDF might require
> less memory per rendering report? Any feedback on this would be very
> helpful.
>

Excel to XML to Dataset to SQL - As HTML

Main goal is to parse an Excel Worksheet and save it as a HTML table to SQL.

I have a web form (aspx) where a use is able to browse and upload an excel documnt. I then select the data from the worksheet and use a OleDBDataAdapter to build a Dataset from the Excel data. I fill the dataset with the data from the Excel document.

What I need to do from this point has me lost. I need to re-engineer the excel data into a HTML table to display within a orgianl asp code. I was planning to build the html table...save it as a large string to SQL database table. And then from asp page - read the table and re-display it.

Im not sure how to do this...anyone with experinece, please help.

Other things I have tried. After I have the excel data saved in the dataset...I can read it via Readxml and display it within the asp.net code. So, I dont knwo if it is possible to save this dataset information as HTML to a string...?

Anyone...please|||

Why not save the Excel as XML instead of HTML to SQL database? As I know you can display XML document in HTML form by using XSLT. So I prefer to save the XML documents as BLOB data into SQL database. You can push the XML data as binary array into SQL Server.

If you're using SQL2005, you can load XML files (actually all BLOB data, including images) into SQL database by using simply OPENROWSET with SINGLE_BLOB option. You can take a look at:

http://msdn.microsoft.com/library/en-us/dnsql90/html/sql2k5xml.asp?frame=true