Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Thursday, March 22, 2012

download excel file

I've uploaded a excel file and i want to force the user to download it
and not display it inline. where can i change the MIME settings of the
report manager?
ThanksHello Owen,
I would like to know this issue a little bit clear.
Do you mean when you click the excel file, you could just open it in the IE?
You could force the IE show the Open & Save dialogbox to enable client user
to download the Excel file.
1. Open a windows explorer.
2. In the Tools -> Folder Options -> File Types -> Find the XLS extension.
3. Click the Advanced button. On the Edit File Type dialogbox, please check
the Confirm open after download and uncheck the Browse in same window.
Hope this will be helpful.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
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.)|||Hi
Thanks for the help, but I want to make the report manager only allow
the download of Excel files and not opening of them inline in IE.
Wei Lu [MSFT] wrote:
> Hello Owen,
> I would like to know this issue a little bit clear.
> Do you mean when you click the excel file, you could just open it in the IE?
> You could force the IE show the Open & Save dialogbox to enable client user
> to download the Excel file.
> 1. Open a windows explorer.
> 2. In the Tools -> Folder Options -> File Types -> Find the XLS extension.
> 3. Click the Advanced button. On the Edit File Type dialogbox, please check
> the Confirm open after download and uncheck the Browse in same window.
> Hope this will be helpful.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> 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.)
>|||Hello Owen,
Unfortunately, you could not do this directly in Reporting Manager.
All the request was handled by the reporting services and we could not
modify it directly.
I would like to know why you want to upload a Excel file to the report
server. Since the report server is used to generate the report, we do not
suggest to upload other file expect the report RDL file to the report
server.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi
I want to distribute a Excelsheet with Olap so power users can customize
their reports.
regardes
Wei Lu [MSFT] wrote:
> Hello Owen,
> Unfortunately, you could not do this directly in Reporting Manager.
> All the request was handled by the reporting services and we could not
> modify it directly.
> I would like to know why you want to upload a Excel file to the report
> server. Since the report server is used to generate the report, we do not
> suggest to upload other file expect the report RDL file to the report
> server.
>
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hello Owen,
Would you please let me know some details of how you make the power user
customize the report?
Do you mean you use the Excel as the datasource?
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello
No Excel has a OLAP-Connection and can be used without reporting
services. I want to change the mime-type so the browser thinks it's a
octead-stream that only leaves the option to save the file and not open
it inline.
Wei Lu [MSFT] wrote:
> Hello Owen,
> Would you please let me know some details of how you make the power user
> customize the report?
> Do you mean you use the Excel as the datasource?
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hello Owen,
Unfortunately, you could not change the mime-type in the report manager
directly.
You need to force the client to change their client setting so that they
will download the excel file only instead of open it in the browser.
When the client get the Open & Save dialogbox, uncheck the Always ask
before opening this type of file and then click the Save to Save it to the
local.
Then, next time when you open the excel file in the Report manager, you
will get the file open directly in local.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello
Its not me with the problem of saving instead of opening the xls but the
end-user. i want to eliminante a potential mistake of the end-user.
Thats why i wont to adjust the mime-type of the xls. I dont care if i
have to set it in a db-table or config file. I just need to know where
the setting is.
Thanks
Wei Lu [MSFT] wrote:
> Hello Owen,
> Unfortunately, you could not change the mime-type in the report manager
> directly.
> You need to force the client to change their client setting so that they
> will download the excel file only instead of open it in the browser.
> When the client get the Open & Save dialogbox, uncheck the Always ask
> before opening this type of file and then click the Save to Save it to the
> local.
> Then, next time when you open the excel file in the Report manager, you
> will get the file open directly in local.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hello Owen,
After consulting the IIS engineer, you could add a MIME type in the IIS
virtual directory.
1. Run "inetmgr" in the start menu.
2. Expand the Web Sites, find the ReportServer virtual directory.
Right-click it and click the Properties.
3. Click the HTTP Headers Tab, then click the MIME Types button and click
New Button.
4. In the Dialogbox, type the .XLS in the entension and octead-stream in
the MIME type section. Click OK.
5. Click OK and then restart the IIS.
Hope this will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi
Thanks for trying but if it was so easy i would of succeded myself. The
problem is that i cant change the default mime-types. i added the
mime-type you suggested but it didn't ovverride the existing. Have you
got any other suggestion. Sorry for all the work i'm creating with this
ping-pong request.
Thanks,
Wei Lu [MSFT] wrote:
> Hello Owen,
> After consulting the IIS engineer, you could add a MIME type in the IIS
> virtual directory.
> 1. Run "inetmgr" in the start menu.
> 2. Expand the Web Sites, find the ReportServer virtual directory.
> Right-click it and click the Properties.
> 3. Click the HTTP Headers Tab, then click the MIME Types button and click
> New Button.
> 4. In the Dialogbox, type the .XLS in the entension and octead-stream in
> the MIME type section. Click OK.
> 5. Click OK and then restart the IIS.
> Hope this will be helpful!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hello Owen,
Would you please test this on other site?
Also, you may try to use the application/octstream for the MIME type.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 19, 2012

Doubt in " HOW TO: Query and Display Excel Data by Using ASP.NET, ADO.NET, and Visual C# .

Hi,

In my application, I need to copy data from an Excel file into a SQL
table. The article related to this can be found at

http://support.microsoft.com/defaul...Ben-us%3B306572

Using this,I am first extracting data from given excel file into a
temporary DataTable. After making some operations on that DataTable
(like splitting one column into two), I am saving the data into actual
table in SQL Server.

My doubt is that, in the above given link, there are few steps needed
to do on the excel file... eg.
--> Highlight the rows and columns where the data resides.
--> On the Insert menu, point to Name, and then click Define.
--> In the Names in workbook text box, type myRange1, and then click
OK.

I don't want my client to do thsese operations everytime he changes
contents in that excel file, as this excel file changes almost daily.
The extracting of data from excel file is done after clicking UPDATE
button on webpage. The person saving data into Excel file is differnet
from the one who updates it into SQL.

Is there any other way where we can directly copy data from excel file
into DataTable without doing the above three steps?

I am using Visual Studio.NET 2003,SQL Server 2000 and C# as developing
language for this web-based project.

Any advice would be greatly appreciated. Thanks in advance.

Regards,
RK."RK" <rakish123@.yahoo.com> wrote in message
news:22626a3.0404020930.7d9bdd7e@.posting.google.co m...
> Hi,
> In my application, I need to copy data from an Excel file into a SQL
> table. The article related to this can be found at
> http://support.microsoft.com/defaul...Ben-us%3B306572
> Using this,I am first extracting data from given excel file into a
> temporary DataTable. After making some operations on that DataTable
> (like splitting one column into two), I am saving the data into actual
> table in SQL Server.
> My doubt is that, in the above given link, there are few steps needed
> to do on the excel file... eg.
> --> Highlight the rows and columns where the data resides.
> --> On the Insert menu, point to Name, and then click Define.
> --> In the Names in workbook text box, type myRange1, and then click
> OK.
> I don't want my client to do thsese operations everytime he changes
> contents in that excel file, as this excel file changes almost daily.
> The extracting of data from excel file is done after clicking UPDATE
> button on webpage. The person saving data into Excel file is differnet
> from the one who updates it into SQL.
> Is there any other way where we can directly copy data from excel file
> into DataTable without doing the above three steps?
> I am using Visual Studio.NET 2003,SQL Server 2000 and C# as developing
> language for this web-based project.
> Any advice would be greatly appreciated. Thanks in advance.
> Regards,
> RK.

The article doesn't mention SQL Server anywhere, and it sounds like your
problem is how to automate something in Excel, so I guess you'll get a
better answer in an Excel or C# newsgroup.

Simon|||RK (rakish123@.yahoo.com) writes:
> Using this,I am first extracting data from given excel file into a
> temporary DataTable. After making some operations on that DataTable
> (like splitting one column into two), I am saving the data into actual
> table in SQL Server.
> My doubt is that, in the above given link, there are few steps needed
> to do on the excel file... eg.
> --> Highlight the rows and columns where the data resides.
> --> On the Insert menu, point to Name, and then click Define.
> --> In the Names in workbook text box, type myRange1, and then click
> OK.
> I don't want my client to do thsese operations everytime he changes
> contents in that excel file, as this excel file changes almost daily.
> The extracting of data from excel file is done after clicking UPDATE
> button on webpage. The person saving data into Excel file is differnet
> from the one who updates it into SQL.
> Is there any other way where we can directly copy data from excel file
> into DataTable without doing the above three steps?

Of course there is.

I have not tried to get data from Excel with SELECT statements, but
would be surprised if "SELECT * FROM Sheet1" would work. I've mainly
use the OLE interface to get data from Excel in Perl. While I understand
that you don't want users to have to highlight things, I fail to see
but that you need to have some pre-defined structure that the Excel
file must have, or else you will have no idea of what you are importing.

But while you said SQL Server twice in your posting (look again Simon! :-),
your question seems more to be related to Excel, so you should find a
group about Excel.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||You might look at the capabilities of SQL Server DTS Packages. They can
read from Excel spreadsheets. However, your datasheet would have to be
massaged enough that the data was a fairly straightforward import.

I suppose if I were you, I'd use a combination of VBA code to hack up the
spreadsheet, save it to a convenient spreadsheet, then use SQL-DMO to
trigger a DTS package for the import.

Otherwise, you could just do a VBA module that would pass in the interesting
data directly over an ADO, OLEDB or ODBC connection. We've done something
like that, it wasn't terribly difficult.

"RK" <rakish123@.yahoo.com> wrote in message
news:22626a3.0404020930.7d9bdd7e@.posting.google.co m...
> Hi,
> In my application, I need to copy data from an Excel file into a SQL
> table. The article related to this can be found at
> http://support.microsoft.com/defaul...Ben-us%3B306572
> Using this,I am first extracting data from given excel file into a
> temporary DataTable. After making some operations on that DataTable
> (like splitting one column into two), I am saving the data into actual
> table in SQL Server.
> My doubt is that, in the above given link, there are few steps needed
> to do on the excel file... eg.
> --> Highlight the rows and columns where the data resides.
> --> On the Insert menu, point to Name, and then click Define.
> --> In the Names in workbook text box, type myRange1, and then click
> OK.
> I don't want my client to do thsese operations everytime he changes
> contents in that excel file, as this excel file changes almost daily.
> The extracting of data from excel file is done after clicking UPDATE
> button on webpage. The person saving data into Excel file is differnet
> from the one who updates it into SQL.
> Is there any other way where we can directly copy data from excel file
> into DataTable without doing the above three steps?
> I am using Visual Studio.NET 2003,SQL Server 2000 and C# as developing
> language for this web-based project.
> Any advice would be greatly appreciated. Thanks in advance.
> Regards,
> RK.|||Hi,

There are a few alternatives. I recommend you to use SQL*XL an addin I
wrote for Excel to do these things. There are some other alternatives
which I will mention.

1. SQL*XL - addin for Excel to access your databases.
SQL*XL is an addin for Excel that allows you to access your database
directly from Excel. You can query data into Excel or you can pump
data from Excel into the database. SQL*XL focusses on making it easy
for the end user but it can also be used to make scripts as it is
fully compatible with Excel macro recording and VBA.

Have a look at SQL*XL at: www.oraxcel.com

2. Define your Excel workbook as a data source in ODBC
If you do this you can issue select statements against it. You can use
it in an openquery statement in SQL server or even make it a linked
server I suppose. Named ranges will appear as tables. Reserve row 1
for the column headers.
Problems with this technique: it is readonly, you may have problems
with accessing the workbook (in use)
The nice thing is that you can use it directly in SQL or DTS

3. You can write a little macro in Excel that dumps the file out in a
nominated format (CSV e.g) and a nominated directory. You could have
DTS to pickup the file and import it in your database table.

Hope this helps,

Gerrit-Jan Linker
Linker IT Consulting Limited
www.oraxcel.com
Author of SQL*XL

Sunday, March 11, 2012

Double quotes in error messages!

I have a problem when trying to display an error message from sql server 2005 on a web page with an alert (javascript command).

The Sql server 2005 returns a message like:

Insert statement conflicted with foreign key constraint "bla bla". The conflict occured indatabase "databasename", table "tablename", column 'columnname'.

In sql server 2000 the error message is the same except all names (constraint, database, table) is in single quotation marks; just like the columnname in the above example.

Is it a configurable issue on the sql server. I would prefer not to solve this issue on a number of different web pages!

Thanks in advance.

Futte

hi,

you should set this:

SET QUOTED_IDENTIFIER { ON | OFF }

When on, then identifiers can be delimited by double quotation marks.

Regards,

Janos

|||

I all ready tried that without any luck.......

I want to avoid the double quotation marks.

Thanks though

Futte

|||

If you wish to 'embed' single quotes in your message, you need to double them up -use two single quotes in each place of one single quote.)

Try this:

SELECT 'This is my ''message'' with quotes.'

|||

I think my question might be a little misunderstood.

My question is not about query syntax in sql regarding single or double quotation marks or two single quotation marks.

It's about the error message sql server is returning. I suddenly experienced that after upgrading sql server from 2000 to 2005 the response from sql 2005 contained double quotation marks around all object names except for one; namely the column name:

2000:

Insert statement conflicted with foreign key constraint 'constraint name'. The conflict occurred in database 'database name', table 'table name', column 'column name'.

2005:

Insert statement conflicted with foreign key constraint "constraint name". The conflict occurred in database "database name", table "table name", column 'column name'.

This is a problem when displaying the error message on a web page with javascript (alert). So if it's a configurable issue on the sql server where is it set? Otherwise I have to handle this error message somewhere else replacing the double quotes with single quotes.

Kind Regards

Futte

|||

Thanks for the clarification. I better understand the situation.

As far as I am aware, there is no user configurable setting to alter the presentation of the error message.

double clicking a trace file does not bring any results

I installed SP4 and when i double click on a sql trace file that i had the
profiler write to, just opens up Profiler and does not display the saved
results.
But when i go File-> Open and select the trace file, it populates the
results. So I dont know why the double clicking does not populate it ? Is it
a bug ? It used to work when i had Sp3a but after installing Sp4, it acts as
such
Has anyone seen this ?Hassan wrote:
> I installed SP4 and when i double click on a sql trace file that i
> had the profiler write to, just opens up Profiler and does not
> display the saved results.
> But when i go File-> Open and select the trace file, it populates the
> results. So I dont know why the double clicking does not populate it
> ? Is it a bug ? It used to work when i had Sp3a but after installing
> Sp4, it acts as such
> Has anyone seen this ?
I've found that the "Action" created for the TRC files by the installer
does not set this up properly. From Explorer, Click on Tools | Folder
Options - File Types. Locate the TRC file extension in the list. Click
the Advanced button. Click New to create a new action. Call it "Open in
Profiler" with the following properties:
Action: "Open in Profiler"
App used to perform action: "C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\profiler.exe" /F%1
Use DDE: Checked
Application: profiler
Topic: System
Press OK and then click the Set Default button to make this the default
action.
You should be good to go.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Still the same.. No luck.. :-(
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%23nXr6wtvFHA.612@.TK2MSFTNGP10.phx.gbl...
> Hassan wrote:
> I've found that the "Action" created for the TRC files by the installer
> does not set this up properly. From Explorer, Click on Tools | Folder
> Options - File Types. Locate the TRC file extension in the list. Click the
> Advanced button. Click New to create a new action. Call it "Open in
> Profiler" with the following properties:
> Action: "Open in Profiler"
> App used to perform action: "C:\Program Files\Microsoft SQL
> Server\80\Tools\Binn\profiler.exe" /F%1
> Use DDE: Checked
> Application: profiler
> Topic: System
> Press OK and then click the Set Default button to make this the default
> action.
> You should be good to go.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||Hassan wrote:
> Still the same.. No luck.. :-(
I use it and it works fine here. Please check the Action against what I
posted to make sure it was typed in correctly. Also make sure it's the
default action. Running SP3a and SP4 versions of SQL Server.
David Gugick
Quest Software
www.imceda.com
www.quest.com

double clicking a trace file does not bring any results

I installed SP4 and when i double click on a sql trace file that i had the
profiler write to, just opens up Profiler and does not display the saved
results.
But when i go File-> Open and select the trace file, it populates the
results. So I dont know why the double clicking does not populate it ? Is it
a bug ? It used to work when i had Sp3a but after installing Sp4, it acts as
such
Has anyone seen this ?Hassan wrote:
> I installed SP4 and when i double click on a sql trace file that i
> had the profiler write to, just opens up Profiler and does not
> display the saved results.
> But when i go File-> Open and select the trace file, it populates the
> results. So I dont know why the double clicking does not populate it
> ? Is it a bug ? It used to work when i had Sp3a but after installing
> Sp4, it acts as such
> Has anyone seen this ?
I've found that the "Action" created for the TRC files by the installer
does not set this up properly. From Explorer, Click on Tools | Folder
Options - File Types. Locate the TRC file extension in the list. Click
the Advanced button. Click New to create a new action. Call it "Open in
Profiler" with the following properties:
Action: "Open in Profiler"
App used to perform action: "C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\profiler.exe" /F%1
Use DDE: Checked
Application: profiler
Topic: System
Press OK and then click the Set Default button to make this the default
action.
You should be good to go.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Still the same.. No luck.. :-(
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%23nXr6wtvFHA.612@.TK2MSFTNGP10.phx.gbl...
> Hassan wrote:
>> I installed SP4 and when i double click on a sql trace file that i
>> had the profiler write to, just opens up Profiler and does not
>> display the saved results.
>> But when i go File-> Open and select the trace file, it populates the
>> results. So I dont know why the double clicking does not populate it
>> ? Is it a bug ? It used to work when i had Sp3a but after installing
>> Sp4, it acts as such
>> Has anyone seen this ?
> I've found that the "Action" created for the TRC files by the installer
> does not set this up properly. From Explorer, Click on Tools | Folder
> Options - File Types. Locate the TRC file extension in the list. Click the
> Advanced button. Click New to create a new action. Call it "Open in
> Profiler" with the following properties:
> Action: "Open in Profiler"
> App used to perform action: "C:\Program Files\Microsoft SQL
> Server\80\Tools\Binn\profiler.exe" /F%1
> Use DDE: Checked
> Application: profiler
> Topic: System
> Press OK and then click the Set Default button to make this the default
> action.
> You should be good to go.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||Hassan wrote:
> Still the same.. No luck.. :-(
I use it and it works fine here. Please check the Action against what I
posted to make sure it was typed in correctly. Also make sure it's the
default action. Running SP3a and SP4 versions of SQL Server.
David Gugick
Quest Software
www.imceda.com
www.quest.com

double clicking a trace file does not bring any results

I installed SP4 and when i double click on a sql trace file that i had the
profiler write to, just opens up Profiler and does not display the saved
results.
But when i go File-> Open and select the trace file, it populates the
results. So I dont know why the double clicking does not populate it ? Is it
a bug ? It used to work when i had Sp3a but after installing Sp4, it acts as
such
Has anyone seen this ?
Hassan wrote:
> I installed SP4 and when i double click on a sql trace file that i
> had the profiler write to, just opens up Profiler and does not
> display the saved results.
> But when i go File-> Open and select the trace file, it populates the
> results. So I dont know why the double clicking does not populate it
> ? Is it a bug ? It used to work when i had Sp3a but after installing
> Sp4, it acts as such
> Has anyone seen this ?
I've found that the "Action" created for the TRC files by the installer
does not set this up properly. From Explorer, Click on Tools | Folder
Options - File Types. Locate the TRC file extension in the list. Click
the Advanced button. Click New to create a new action. Call it "Open in
Profiler" with the following properties:
Action: "Open in Profiler"
App used to perform action: "C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\profiler.exe" /F%1
Use DDE: Checked
Application: profiler
Topic: System
Press OK and then click the Set Default button to make this the default
action.
You should be good to go.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Still the same.. No luck.. :-(
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%23nXr6wtvFHA.612@.TK2MSFTNGP10.phx.gbl...
> Hassan wrote:
> I've found that the "Action" created for the TRC files by the installer
> does not set this up properly. From Explorer, Click on Tools | Folder
> Options - File Types. Locate the TRC file extension in the list. Click the
> Advanced button. Click New to create a new action. Call it "Open in
> Profiler" with the following properties:
> Action: "Open in Profiler"
> App used to perform action: "C:\Program Files\Microsoft SQL
> Server\80\Tools\Binn\profiler.exe" /F%1
> Use DDE: Checked
> Application: profiler
> Topic: System
> Press OK and then click the Set Default button to make this the default
> action.
> You should be good to go.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
|||Hassan wrote:
> Still the same.. No luck.. :-(
I use it and it works fine here. Please check the Action against what I
posted to make sure it was typed in correctly. Also make sure it's the
default action. Running SP3a and SP4 versions of SQL Server.
David Gugick
Quest Software
www.imceda.com
www.quest.com

Sunday, February 26, 2012

Dont display the field if it contains a zero value

I'm working on a report for accounting. Usually debit and credit prob. I don't want to display the field if it contains zero. It creates a gap on my reports and want to avoid it.
Anyone who can help?
Thanks.Using CR 8.5 and RDC, each field has a setting called 'SuppressIfZero' and one called 'SuppressIfBlank'. As the name implies, setting the 'SuppressIfZero' to True will suppress the field if the value is Zero, setting the 'SuppressIfBlank' to True will suppress the field if it's blank.|||I did what you said but I still get a gap between my text. How can I eliminate it?

Thanks.|||Try to put the field in a separate section (If possible), and Suppress section if that value is blank.|||Hi

try suppressing the field or use a formula

if (fieldname) = "0" then "No Data"

I was working on the same thing in crystal reports 9 and got up to this finally.

c ya

Dont Display dbo. in Object Explorer

Is there a way to stop SQL Server Management Studio (2005) from showing "dbo." on everything in the object explorer.

I'd love to turn that off on a database I'm working on as, for example, if you have to find tblMember, you'd have to type d-b-o-.-t-b-l-m before you can actually start jumping to the table you're interested in - whereas in Enterprise Manager (2000) you'd only have to type t-b-l-m if you get my meaning.

Hi there,

There no such option as to hide the owner of the datatable. Actually this is good because the owner is a very strong security feature SQL Server provides. You may want to have in mind who is the owner especially if you are going to host your application in a shared environment where all tables will be owned by your Sql user (which will definitely not be sa).
Sorry for bringing the bad news,
Cheers,

Andreas Botsikas

Dont display address if its not there!

hi there, i have a invoice template that when printed has a box for the users address (which there always will be) and a box for their delivery address if they are having the items delivered. However sometimes they dont have things delivered and so the record in the delivery table does not exist. In this case it will throw an error, how can i avoid this. the code im using i have posted below

string sql ="SELECT [del_address], [del_post_code], [del_date], [del_time] From tbl_del WHERE order_ID = " + intOrderID;

//This creates a sql command which executes the sql statement.

SqlCommand sqlCmd =newSqlCommand(sql, myConn);

myConn.Open();

SqlDataReader dr = sqlCmd.ExecuteReader();

//This reads the first result from the sqlReader

dr.Read();

try

{

//string strDel_Address = dr["del_address"].ToString();

if (Convert.ToString(dr["del_charge"].ToString()) !=null)

{

//delivery items

lblDelAddy.Text = dr["del_address"].ToString();

lblDelPCode.Text = dr["del_post_code"].ToString();

Instead of "dr.Read();" use "while (dr.Read())" If there is no record it wont even try to fill the items

while (dr.Read()){//Do something}
|||

ah thank you, the problem though is that there is this line

if (Convert.ToString(dr["del_charge"].ToString()) !=null)

and several lines like it below which rely on it bringing something back, how could i change it so if it dosnt exist almost to not do anything?

|||

When you usewhile (dr.Read()) if there are no records it will not go into that block of code. This will solve your problem, give it a try.

Tuesday, February 14, 2012

Does Visual web developer Express edition works with Ms 2000 Database Service?

I have made my website using SQL Server Express edition. It is totally database driven and manypages use databases to display data. My problem is that after paying for webhosting fees my web host told me that they do not support SQL Server express edition. Instead they have support for MySQL and Ms Access. Except that there is this MS 2000 Database service for an additional cost. Any recommendations what I should do except changing the host? If I pay for MS 2000 Database servicem, will my website work? My user management(i.e ASPNETDB database) was created by Visual Web developer and I don't want to do user management myself. Any advice?

HI Gurus,

I am also facing the same problem, i developed asp.net 2.0 application with Sql Server 2005 Express edition, with the bundled user managment facility. After completion the project, my host told, they only support SqlServer 2000 version.

In my website every pages linked with the database (connection strings). I dont know what i need to do?

This is very urgent, can anyone help? (Include Mr. Rex lim)

Sankar

|||

Hi,

Actually you can import the aspnetdb database into your SQLServer2000 by aspnet_regsql tool, backup the database file, restore it on your server-side. In this way, you can use membership, profile with SQL Server2000 database.

More detail about the tool:http://msdn2.microsoft.com/en-us/library/ms229862(vs.80).aspx

Thanks.