Showing posts with label based. Show all posts
Showing posts with label based. Show all posts

Monday, March 12, 2012

Nested Database Transactions in Forms

This should be a fairly simple question. It's based on this error message:

"Transaction count after EXECUTEindicates that a COMMIT or ROLLBACK TRANSACTION statement is missing.Previous count = 1, current count = 0."

I get this when executing a stored procedure upon processing a form. This error happens when I intentionally provide input to the stored procedure that I know should cause it to error out. I catch the exception, and it contains the error message, but it also contains the above message added on to it, which I don't want.

I won't post the entire stored procedure. But I'll list a digest of it (Just those lines that are significant). Assume that what's included is what happens when I provide bad input:

BEGIN

BEGIN TRY
BEGIN TRANSACTION
RAISERROR('The item selected does not exist in the database.', 16, 1);
COMMIT -- This won't execute when the RAISERROR breaks out to the CATCH block
END TRY

BEGIN CATCH
ROLLBACK
DECLARE @.ErrorSeverity INT, @.ErrorMessage NVARCHAR(4000)
SET @.ErrorSeverity = ERROR_SEVERITY()
SET @.ErrorMessage = ERROR_MESSAGE()
RAISERROR(@.ErrorMessage, @.ErrorSeverity, 1)
END CATCH

END

Okay, so that works fine. The problem is when I execute this with an SqlCommand object, on which I've opened a transaction. I won't include the entire setup of the data (with the parameters, since those seem fine), but I'll give my code that opens the connection and executes the query:

con.Open();
SqlTransaction transaction = con.BeginTransaction();
command.Transaction = transaction;

try
{
command.ExecuteNonQuery();
transaction.Commit();
}
catch (Exception ex)
{
transaction.Rollback();
}
finally
{
con.Close();
}

I'm calling the stored procedure listed above (which has its own transaction), using a SqlCommand object on which I've opened a transaction. When there is no error it works fine. But when I give the stored procedure bad data, it gives me that message about the transaction count.

Is there something I need to do in either my SQL or my C# to handle this? The entire message found in the Exception's Message is a concatenation of the message in my RAISERROR, along with the transaction count message I quoted at the beginning.

Thanks,

-Dan

In playing around with it, I've come to learn that the Exception.Message is the concatenation of any messages the exception holds. So, my CATCH block could contain this instead:

Label.Text = String.Format("Error: {0}", ex.Errors[0].Message);

That only gives the first error, which is the one I want (the one specified in RAISERROR). I just don't know if this is what I should do. Is that transaction count message something I should be concerned about, or will that always happen? Should I just use the first message in the exception?

Thanks.

Wednesday, March 7, 2012

Needed software for designing reports

We currently have SQL 2005 (enterprise) reporting services hitting an
odbc based backend (mysql usually). It works great. I run Visual
Studio Pro (and have msdn sql server on my local machine), develop
reports locally and deploy them.
I know the express edition of SQL 2005 reporting services cannot use
an ODBC datasource. Only the standard and up versions.
My question is: For other employees to create and deploy reports what
software (and licenses) are needed? Ideally, I'd love to just deploy
Visual Studio Express and SQL 2005 Express for the users that need to
modify reports, but I have a feeling that won't work...
any ideas?
thank you!If they are just designing reports then you can give the BI Studio (not sure
if that is what it is called). When you install the designer it installs a
version of VS if you do not have it installed. This is free. Also, there are
no licensing issue either. RS is licensed by the server, not by where you
have the client tools installed.
You will want to have a server they can deploy to as part of the development
process, however, for most of their testing they can do this from the
development environment.
If the users can't handle Report Designer (which is really a developer
targeted tool) then check out report builder.
Note, you do not need SQL Server install locally in order to design reports.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
<eric.gay@.gmail.com> wrote in message
news:1179174786.894457.142220@.h2g2000hsg.googlegroups.com...
> We currently have SQL 2005 (enterprise) reporting services hitting an
> odbc based backend (mysql usually). It works great. I run Visual
> Studio Pro (and have msdn sql server on my local machine), develop
> reports locally and deploy them.
> I know the express edition of SQL 2005 reporting services cannot use
> an ODBC datasource. Only the standard and up versions.
> My question is: For other employees to create and deploy reports what
> software (and licenses) are needed? Ideally, I'd love to just deploy
> Visual Studio Express and SQL 2005 Express for the users that need to
> modify reports, but I have a feeling that won't work...
> any ideas?
> thank you!
>

Monday, February 20, 2012

Need to transform table data to excel 2003 files

Hi,
Can I use SQL Server Integration Services to generate Excel 2003 spread
sheets based on or database data?
We already have Excel 2003 templates and we need to generate excel 2003 xls
files based on our database table data. What would b the best way to do
that?
Any help would be appreciated,
Max
"Maxwell2006" <alanalan@.newsgroup.nospam> wrote in message
news:O1R9oeXGHHA.3616@.TK2MSFTNGP06.phx.gbl...
> Hi,
> Can I use SQL Server Integration Services to generate Excel 2003 spread
> sheets based on or database data?
> We already have Excel 2003 templates and we need to generate excel 2003
> xls files based on our database table data. What would b the best way to
> do that?
I did something like this once for an Intranet reporting application. The
best solution (easy and performant) that I came up with was to grab the data
using SELECT ... FOR XML and perform an XSL transformation on it. Excel
2003 has a rich set of features in the XML format (though I don't think you
can embed tables and charts in the Excel XML format files).
|||Hello Mike,
To understand the issue better, I'd like to know how you want to use the
2003 template when transform the data from database to spreedsheet. An
example might be more clear.
You shall be able to export data directly to Excel file in SQL Server. In
Management Studio (2005), right click the database->Tasks->Export data,
follow the wizard to select source and select Microsoft Excle as
destination, and select the destination path of excel file.
Also, in SSIS, you could be more flexisble to get the source of the data.
1. You could use the OLEDB or datareader data source, and use select SQL
query to get the data you want.
2. You could use Excel Destination as the data destination and select Excel
file or create new Excel as you want.
3. YOu also be able to select the proper columns for mapping in able object
and use other data folow transformation if necessary.
As Mike mentioned, you could use "SELECT ... FOR XML" to get XML format of
the data and do transformation by using XSL.
As for as I know, Excel destination does not include configuration to
create new file from xlt template. This might be finished before
transformation by using an Activex scipt task or a Script task. For example
by using Activex script task you may use code like:
Dim sTemplatePath, sTargetPath, sSourceFileName, sTargetFileName
sSourceFileName = "temp.xlt"
sTargetFileName = "test.xls"
sTemplatePath = "C:\"
sTargetPath = "C:\"
sTargetFileName = sTargetPath & year(now) & "-" & month(now) & "-" &
day(now) - 1 & " " & sTargetFileName
DTSGlobalVariables("sFileName").Value = sTargetFileName
sSourceFileName = sTemplatePath & sSourceFileName
Dim oFSO
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.CopyFile sSourceFileName, sTargetFileName
Set oFSO = Nothing
If you have any update or comments, 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.
|||"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:32UR4gaGHHA.2304@.TK2MSFTNGHUB02.phx.gbl...
> Hello Mike,
> To understand the issue better, I'd like to know how you want to use the
> 2003 template when transform the data from database to spreedsheet. An
> example might be more clear.
I don't "want to", I already "did". It's been done. Now if you really want
to help me instead of Max, tell me how to embed charts and graphics in Excel
XML format documents.

> You shall be able to export data directly to Excel file in SQL Server. In
> Management Studio (2005), right click the database->Tasks->Export data,
> follow the wizard to select source and select Microsoft Excle as
> destination, and select the destination path of excel file.
> Also, in SSIS, you could be more flexisble to get the source of the data.
> 1. You could use the OLEDB or datareader data source, and use select SQL
> query to get the data you want.
> 2. You could use Excel Destination as the data destination and select
> Excel
> file or create new Excel as you want.
> 3. YOu also be able to select the proper columns for mapping in able
> object
> and use other data folow transformation if necessary.
> As Mike mentioned, you could use "SELECT ... FOR XML" to get XML format of
> the data and do transformation by using XSL.
> As for as I know, Excel destination does not include configuration to
> create new file from xlt template. This might be finished before
> transformation by using an Activex scipt task or a Script task. For
> example
> by using Activex script task you may use code like:
>
> Dim sTemplatePath, sTargetPath, sSourceFileName, sTargetFileName
> sSourceFileName = "temp.xlt"
> sTargetFileName = "test.xls"
> sTemplatePath = "C:\"
> sTargetPath = "C:\"
> sTargetFileName = sTargetPath & year(now) & "-" & month(now) & "-" &
> day(now) - 1 & " " & sTargetFileName
> DTSGlobalVariables("sFileName").Value = sTargetFileName
> sSourceFileName = sTemplatePath & sSourceFileName
> Dim oFSO
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> oFSO.CopyFile sSourceFileName, sTargetFileName
> Set oFSO = Nothing
> If you have any update or comments, 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.
>
|||Hello Mike,
Sorry for my fault. My reply is for Max insead of you.
The XML Spreadsheet format describes the contents of the workbook by
persisting cell data and formulas, cell formats, worksheet settings, and
workbook settings. Some Excel features cannot be persisted in XML. The
following Excel features cannot be persisted in XML: Charts
OLE Objects
Drawing shapes or AutoShapes
VBA Projects
Group and Outline
Please see the following article for details:
287739XL2002: Error Message: The Following Features from Your Workbook
Will Not Be Saved in the XML Spreadsheet
http://support.microsoft.com/default.aspx?scid=kb;EN-US;287739
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

Need to transform table data to excel 2003 files

Hi,
Can I use SQL Server Integration Services to generate Excel 2003 spread
sheets based on or database data?
We already have Excel 2003 templates and we need to generate excel 2003 xls
files based on our database table data. What would b the best way to do
that?
Any help would be appreciated,
Max"Maxwell2006" <alanalan@.newsgroup.nospam> wrote in message
news:O1R9oeXGHHA.3616@.TK2MSFTNGP06.phx.gbl...
> Hi,
> Can I use SQL Server Integration Services to generate Excel 2003 spread
> sheets based on or database data?
> We already have Excel 2003 templates and we need to generate excel 2003
> xls files based on our database table data. What would b the best way to
> do that?
I did something like this once for an Intranet reporting application. The
best solution (easy and performant) that I came up with was to grab the data
using SELECT ... FOR XML and perform an XSL transformation on it. Excel
2003 has a rich set of features in the XML format (though I don't think you
can embed tables and charts in the Excel XML format files).|||Hello Mike,
To understand the issue better, I'd like to know how you want to use the
2003 template when transform the data from database to spreedsheet. An
example might be more clear.
You shall be able to export data directly to Excel file in SQL Server. In
Management Studio (2005), right click the database->Tasks->Export data,
follow the wizard to select source and select Microsoft Excle as
destination, and select the destination path of excel file.
Also, in SSIS, you could be more flexisble to get the source of the data.
1. You could use the OLEDB or datareader data source, and use select SQL
query to get the data you want.
2. You could use Excel Destination as the data destination and select Excel
file or create new Excel as you want.
3. YOu also be able to select the proper columns for mapping in able object
and use other data folow transformation if necessary.
As Mike mentioned, you could use "SELECT ... FOR XML" to get XML format of
the data and do transformation by using XSL.
As for as I know, Excel destination does not include configuration to
create new file from xlt template. This might be finished before
transformation by using an Activex scipt task or a Script task. For example
by using Activex script task you may use code like:
Dim sTemplatePath, sTargetPath, sSourceFileName, sTargetFileName
sSourceFileName = "temp.xlt"
sTargetFileName = "test.xls"
sTemplatePath = "C:\"
sTargetPath = "C:\"
sTargetFileName = sTargetPath & year(now) & "-" & month(now) & "-" &
day(now) - 1 & " " & sTargetFileName
DTSGlobalVariables("sFileName").Value = sTargetFileName
sSourceFileName = sTemplatePath & sSourceFileName
Dim oFSO
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.CopyFile sSourceFileName, sTargetFileName
Set oFSO = Nothing
If you have any update or comments, 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/subscript...ault.aspx#notif
ications
<http://msdn.microsoft.com/subscript...ps/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/subscript...rt/default.aspx>.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.|||"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:32UR4gaGHHA.2304@.TK2MSFTNGHUB02.phx.gbl...
> Hello Mike,
> To understand the issue better, I'd like to know how you want to use the
> 2003 template when transform the data from database to spreedsheet. An
> example might be more clear.
I don't "want to", I already "did". It's been done. Now if you really want
to help me instead of Max, tell me how to embed charts and graphics in Excel
XML format documents.

> You shall be able to export data directly to Excel file in SQL Server. In
> Management Studio (2005), right click the database->Tasks->Export data,
> follow the wizard to select source and select Microsoft Excle as
> destination, and select the destination path of excel file.
> Also, in SSIS, you could be more flexisble to get the source of the data.
> 1. You could use the OLEDB or datareader data source, and use select SQL
> query to get the data you want.
> 2. You could use Excel Destination as the data destination and select
> Excel
> file or create new Excel as you want.
> 3. YOu also be able to select the proper columns for mapping in able
> object
> and use other data folow transformation if necessary.
> As Mike mentioned, you could use "SELECT ... FOR XML" to get XML format of
> the data and do transformation by using XSL.
> As for as I know, Excel destination does not include configuration to
> create new file from xlt template. This might be finished before
> transformation by using an Activex scipt task or a Script task. For
> example
> by using Activex script task you may use code like:
>
> Dim sTemplatePath, sTargetPath, sSourceFileName, sTargetFileName
> sSourceFileName = "temp.xlt"
> sTargetFileName = "test.xls"
> sTemplatePath = "C:\"
> sTargetPath = "C:\"
> sTargetFileName = sTargetPath & year(now) & "-" & month(now) & "-" &
> day(now) - 1 & " " & sTargetFileName
> DTSGlobalVariables("sFileName").Value = sTargetFileName
> sSourceFileName = sTemplatePath & sSourceFileName
> Dim oFSO
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> oFSO.CopyFile sSourceFileName, sTargetFileName
> Set oFSO = Nothing
> If you have any update or comments, 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
> l]
> ications
> <[url]http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx" target="_blank">http://msdn.microsoft.com/subscript...ps/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/subscript...rt/default.aspx>.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Mike,
Sorry for my fault. My reply is for Max insead of you.
The XML Spreadsheet format describes the contents of the workbook by
persisting cell data and formulas, cell formats, worksheet settings, and
workbook settings. Some Excel features cannot be persisted in XML. The
following Excel features cannot be persisted in XML: Charts
OLE Objects
Drawing shapes or AutoShapes
VBA Projects
Group and Outline
Please see the following article for details:
287739 XL2002: Error Message: The Following Features from Your Workbook
Will Not Be Saved in the XML Spreadsheet
http://support.microsoft.com/defaul...kb;EN-US;287739
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============

Need to transform table data to excel 2003 files

Hi,
Can I use SQL Server Integration Services to generate Excel 2003 spread
sheets based on or database data?
We already have Excel 2003 templates and we need to generate excel 2003 xls
files based on our database table data. What would b the best way to do
that?
Any help would be appreciated,
Max"Maxwell2006" <alanalan@.newsgroup.nospam> wrote in message
news:O1R9oeXGHHA.3616@.TK2MSFTNGP06.phx.gbl...
> Hi,
> Can I use SQL Server Integration Services to generate Excel 2003 spread
> sheets based on or database data?
> We already have Excel 2003 templates and we need to generate excel 2003
> xls files based on our database table data. What would b the best way to
> do that?
I did something like this once for an Intranet reporting application. The
best solution (easy and performant) that I came up with was to grab the data
using SELECT ... FOR XML and perform an XSL transformation on it. Excel
2003 has a rich set of features in the XML format (though I don't think you
can embed tables and charts in the Excel XML format files).|||Hello Mike,
To understand the issue better, I'd like to know how you want to use the
2003 template when transform the data from database to spreedsheet. An
example might be more clear.
You shall be able to export data directly to Excel file in SQL Server. In
Management Studio (2005), right click the database->Tasks->Export data,
follow the wizard to select source and select Microsoft Excle as
destination, and select the destination path of excel file.
Also, in SSIS, you could be more flexisble to get the source of the data.
1. You could use the OLEDB or datareader data source, and use select SQL
query to get the data you want.
2. You could use Excel Destination as the data destination and select Excel
file or create new Excel as you want.
3. YOu also be able to select the proper columns for mapping in able object
and use other data folow transformation if necessary.
As Mike mentioned, you could use "SELECT ... FOR XML" to get XML format of
the data and do transformation by using XSL.
As for as I know, Excel destination does not include configuration to
create new file from xlt template. This might be finished before
transformation by using an Activex scipt task or a Script task. For example
by using Activex script task you may use code like:
Dim sTemplatePath, sTargetPath, sSourceFileName, sTargetFileName
sSourceFileName = "temp.xlt"
sTargetFileName = "test.xls"
sTemplatePath = "C:\"
sTargetPath = "C:\"
sTargetFileName = sTargetPath & year(now) & "-" & month(now) & "-" &
day(now) - 1 & " " & sTargetFileName
DTSGlobalVariables("sFileName").Value = sTargetFileName
sSourceFileName = sTemplatePath & sSourceFileName
Dim oFSO
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.CopyFile sSourceFileName, sTargetFileName
Set oFSO = Nothing
If you have any update or comments, 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.|||"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:32UR4gaGHHA.2304@.TK2MSFTNGHUB02.phx.gbl...
> Hello Mike,
> To understand the issue better, I'd like to know how you want to use the
> 2003 template when transform the data from database to spreedsheet. An
> example might be more clear.
I don't "want to", I already "did". It's been done. Now if you really want
to help me instead of Max, tell me how to embed charts and graphics in Excel
XML format documents.
> You shall be able to export data directly to Excel file in SQL Server. In
> Management Studio (2005), right click the database->Tasks->Export data,
> follow the wizard to select source and select Microsoft Excle as
> destination, and select the destination path of excel file.
> Also, in SSIS, you could be more flexisble to get the source of the data.
> 1. You could use the OLEDB or datareader data source, and use select SQL
> query to get the data you want.
> 2. You could use Excel Destination as the data destination and select
> Excel
> file or create new Excel as you want.
> 3. YOu also be able to select the proper columns for mapping in able
> object
> and use other data folow transformation if necessary.
> As Mike mentioned, you could use "SELECT ... FOR XML" to get XML format of
> the data and do transformation by using XSL.
> As for as I know, Excel destination does not include configuration to
> create new file from xlt template. This might be finished before
> transformation by using an Activex scipt task or a Script task. For
> example
> by using Activex script task you may use code like:
>
> Dim sTemplatePath, sTargetPath, sSourceFileName, sTargetFileName
> sSourceFileName = "temp.xlt"
> sTargetFileName = "test.xls"
> sTemplatePath = "C:\"
> sTargetPath = "C:\"
> sTargetFileName = sTargetPath & year(now) & "-" & month(now) & "-" &
> day(now) - 1 & " " & sTargetFileName
> DTSGlobalVariables("sFileName").Value = sTargetFileName
> sSourceFileName = sTemplatePath & sSourceFileName
> Dim oFSO
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> oFSO.CopyFile sSourceFileName, sTargetFileName
> Set oFSO = Nothing
> If you have any update or comments, 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.
>|||Hello Mike,
Sorry for my fault. My reply is for Max insead of you.
The XML Spreadsheet format describes the contents of the workbook by
persisting cell data and formulas, cell formats, worksheet settings, and
workbook settings. Some Excel features cannot be persisted in XML. The
following Excel features cannot be persisted in XML: ? Charts
? OLE Objects
? Drawing shapes or AutoShapes
? VBA Projects
? Group and Outline
Please see the following article for details:
287739 XL2002: Error Message: The Following Features from Your Workbook
Will Not Be Saved in the XML Spreadsheet
http://support.microsoft.com/default.aspx?scid=kb;EN-US;287739
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================