Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Thursday, March 29, 2012

DataType Problem

Hi,

I want to pass data to the stored procedure by vb code.One of the input parameters of the SP has Text Data Type.whats the equivalent of this datatype in vb?

Thanks in Advance.

You can use byte array (byte[]) for BLOB data type (text/ntext/image) in SQL Server:)

Datatype mismatch in export

I am exporting my sql table to the access database. My text fileds in SQL are stored as varchar(50) in SQL server 2005. but when I export the table to Access, These fileds get converted to 'memo' fields. I tried converting these memo fields in access to text field but Access does do that, throws an error message saying not enough disk space.

When I try to convert these 'varchar' fields in sql to text fileds, sql throws a 'time out ' message nad does not convert it to text.

What do I do?

Thanks


As per the guidelines of Microsoft, the equivalent of 'VARCHAR' in Sql server is 'TEXT' in MS-Access. How are you exporting Sql server data to Access? Are you using SSIS? On a side note, equivalent of 'MEMO' is 'TEXT' in Sql Server. I wouldn't recommend you to change the data type in Sql Server to change to 'TEXT'.

Text data type in Sql Server is used to store large texts that go beyond 8KB in size. Usually, sql server keeps a 16 byte pointer to the text data in the page. It can contain upto 2 GB size data. In Sql Server 2005, usage of Text data type is not recommended and varchar(max) is recommended.

http://articles.techrepublic.com.com/5100-6345-5033381.html
https://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part2/c0561.mspx?mfr=true

DataType change

I recieve a text file with a field that has a text format of 20010910. I import this data into sql server 7.0 utilizing the import wizard. (The wizard will not convert the data to datetime format) I need to know how to convert this data into date format of 2001/09/10. How do I do this in sql.

Thank You,
David A. FullertonYou can add a string column to your table and CONVERT in a post-importing execution or use Visual Basic CDATE in Transformation tab in DTS just before click OK in usual IMPORT... dialog|||CDATE will not work in this example. However, I agree with Cesar's recommendations. In this case, since using vbscript will be more complicated than using cdate you can try the following after the data is loaded:

select convert(varchar(10), cast('20010920' as datetime), 111)|||Thank You That worked..Have a great day!|||Happy to help and good luck.

datatype

does any know how sqlserver 2000 'text' datatype is mapped in sqlserver JDBC driver? where can i find documentation of for data mapping between sqlserver datatypes and jdbc datatypes?
neo wrote:

> does any know how sqlserver 2000 'text' datatype is mapped in sqlserver JDBC driver? where can i find documentation of for data mapping between sqlserver datatypes and jdbc datatypes?
Hi. The simple test would be to query a text column and do a getObject() and see
what sort of object you got. However, it is simple just to tell the driver what
sort of object you want, by doing a getString() if you want a string, getAsciiStream()
if you want a stream, etc.
Joe Weinstein at BEA
|||The document from "SQLServer 2000 driver for JDBC User's Guide and
Reference" - 3 SQL Server 2000 Driver for JDBC - Data Types have this
information.
"neo" <anonymous@.discussions.microsoft.com> bl
news:19024BF8-645E-45E9-B014-DD475462204D@.microsoft.com g...
> does any know how sqlserver 2000 'text' datatype is mapped in sqlserver
JDBC driver? where can i find documentation of for data mapping between
sqlserver datatypes and jdbc datatypes?

Tuesday, March 27, 2012

DataTable.select method

helloo

Can I use "like" in datatable.select method?

meaning:

Dim exp As String = "c.cDesc like " & txtSearch.Text & " + N'%' "
Dim rows() As DataRow = dtCenters.Select(exp)

knowing that txtSearch.text has unicode characters

Yes. However, your expression does not include quotes so you are probably not sending what you think you are sending.

Dim exp As String = "c.cDesc like '" & txtSearch.Text & "' + N'%' "

The better option is to use a parameter and set the value of the parameter to your textbox.

sql

DataSource uploads as text file type

Hi,
I have a new installation of SQLExpress ADV with RS installed on XP Pro.
When I try to upload an rds file (which has already been running
successfully on a w2k3 server), it uploads as a text file and NOT as a
Datasource.
The associated report does of course not work.
Anyone seen this before - or know how to fix it please '.
Thanks
Regards
GrahamHi Oxns,
Thank you for your posting!
From your description, my understanding of this issue is: you want to
upload the report data source file as a shared data source in the report
manager. If I misunderstood your concern, please feel free to let me know.
You cannot upload a report data source (.rds) file to create a shared data
source. An .rds file is used only in Report Designer. It cannot provide the
content for a shared data source item that you define and manage through
Report Manager or Management Studio. As an alternative to uploading, you
can write a script that creates a shared data source based on a .rds file.
Please refer to the sample script PublishSamplReports.rss file in the
Samples. By default, scripting samples are located in C:\Program
Files\Microsoft SQL Server\90\Samples\Reporting Services\Script Samples.
Here are the articles for your reference:
Script Samples (Reporting Services)
http://msdn2.microsoft.com/en-us/library/ms160854(d=ide).aspx
Uploading Files to a Folder
http://msdn2.microsoft.com/en-us/library/ms156300(d=ide).aspx
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 Oxns,
How are you doing on this issue? Have you got any progress or does Wei's
last reply help you some on this? If the problem is not resolved or there
is anything else we can help, please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, March 25, 2012

Datasets and Text Boxes

I have a table referring to a dataset called ds1 . I have txtbx1,2,3 in
the table.
all text boxes are now referred to different ds1 columns. I created
another Dataset called DS2 (becuase of business needs). Now I wanted
one Text box txtbx1 refer to ds2 column and the txtbx2 refer to DS1
column although the whole table is under DS1 (under which these
txtboxes are) - when I do that the txtbx1 and ds2 column gets repeated.
Please let me know the best way to accomplish this.
Also wanted to see if we can do some logical conditions in the txt
boxes.
Anyyy Help would be greatly appreciated !!!!!!!!!!
ThanksHi,
Try like this. e.g.
=(Fields!emp.Value, "DS2")
Amarnath
"Sen" wrote:
> I have a table referring to a dataset called ds1 . I have txtbx1,2,3 in
> the table.
> all text boxes are now referred to different ds1 columns. I created
> another Dataset called DS2 (becuase of business needs). Now I wanted
> one Text box txtbx1 refer to ds2 column and the txtbx2 refer to DS1
> column although the whole table is under DS1 (under which these
> txtboxes are) - when I do that the txtbx1 and ds2 column gets repeated.
> Please let me know the best way to accomplish this.
> Also wanted to see if we can do some logical conditions in the txt
> boxes.
> Anyyy Help would be greatly appreciated !!!!!!!!!!
> Thanks
>|||When I do that the Fields!emp.Value gets repeated - just because the
coverig table dataset area is DS1.

Wednesday, March 21, 2012

dataset in main report and subreport

This is a multi-part message in MIME format.
--=_NextPart_000_0009_01C6B485.898E4410
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
We have a main report that calls a subreport. The subreport is being = passed the appropriate parameters.
The subreport works correctly in isolation in the preview mode. However, = when it is called
in a main report it stops working. I get the message
"Error: Subreport could not be shown."
The main report is NOT using a shared dataset, but subreport is. Initially the main report was using a shared dataset and the subreport = was working correctly.
However, since we need to create report columns on the fly (for ad-hoc = reports) so we have to generate the RDL at run-time and use = ReportExecutionService.LoadReportDefinition method to load RDLto report = server. This method requires RDL to use private data source/dataset.
Am I required to do some kind of special handling for these kind of = subreports?
Thanks
--=_NextPart_000_0009_01C6B485.898E4410
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi,
We have a main report that calls a subreport. The subreport is = being passed the appropriate parameters.The subreport works correctly in = isolation in the preview mode. However, when it is calledin a main report it stops = working. I get the message"Error: Subreport could not be shown."The main = report is NOT using a shared dataset, but subreport is. Initially the main = report was using a shared dataset and the subreport was working correctly.

However, since we need to create report columns on the fly (for = ad-hoc reports) so we have to generate the RDL at run-time and use ReportExecutionService.LoadReportDefinition method to load RDLto report = server. This method requires RDL to use private data source/dataset.
Am I required to do some kind of special handling for these = kind of subreports?

Thanks
</FONT></FONT>
--=_NextPart_000_0009_01C6B485.898E4410--Hi spamme,
Thank you for using MSDN Managed Newsgroup Support.
From your description, my understanding of this issue is: You could not see
your subreport and you get the error "Error: Subreport could not be
shown.". If I misunderstood your concern, please feel free to let me know.
I would like to get the Report Error log file to troubleshot this issue. By
default, the log file is located at \Microsoft SQL Server\<SQL Server
Instance>\Reporting Services\LogFiles.
Please post the error in the log file so that I could provide further
assistance.
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.)|||This is a multi-part message in MIME format.
--=_NextPart_000_0007_01C6B59D.95D1DED0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Wei,
Here are the errors from report server log file: (the two always came =together)
We changed to have both main report and subreport use private data =sources, but we were still getting same error.
w3wp!webserver!1!08/01/2006-16:46:18:: i INFO: Processed report. =Report=3D'/', Stream=3D''
w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to CreateDataSource( ='MyReport', '/Data Sources', dataSourceDefinition )
w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to CreateReport( ='BudgetAdHoc', '/EventReports', def)
w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to =SetReportDefinition( '/EventReports/BudgetAdHoc', def )
w3wp!library!1!08/01/2006-16:49:39:: e ERROR: Throwing =Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found., ;
Info: =Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found.
w3wp!processing!1!08/01/2006-16:49:39:: e ERROR: An error has occurred =while retrieving datasources for a sub-report. Details: The item ='/GenericSubreportEventDetails' cannot be found. Stack trace:
at =Microsoft.ReportingServices.Library.RSService.GetCompiledDefinition(Strin=g originalItemPath, String itemPath, ItemType& type, ReportSnapshot& =compiledDefinition, Guid& executionSnapshotID, String& properties, =String& description, Byte[]& secDesc, Guid& reportID, Int32& =execOptions)
at =Microsoft.ReportingServices.Library.RSService.ProcessingGetDataSources(Ca=talogItemContext reportContext, String subreportPath, =CatalogItemContext& subreportContext, GetReportChunk& =getCompiledDefinition, DataSourceInfoCollection& dataSources)
at =Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CheckCreden=tials(Report report, DataSourceInfoCollection dataSources, =CatalogItemContext reportContext, SubReportDataSourcesCallback =subReportCallback, RuntimeDataSourceInfoCollection allDataSources, Int32 =subReportLevel, Boolean checkIfUsable, ServerDataSourceSettings =serverDatasourceSettings)
w3wp!library!1!08/01/2006-16:49:41:: i INFO: Call to RenderFirst( '' )
w3wp!library!1!8/1/2006-16:49:41:: e ERROR: Throwing =Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found., ;
Info: =Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found.
w3wp!processing!1!8/1/2006-16:49:41:: e ERROR: An error has occurred =while processing a sub-report. Details: The item ='/GenericSubreportEventDetails' cannot be found. Stack trace:
at =Microsoft.ReportingServices.Library.RSService.ProcessingGetSubreport(Cata=logItemContext reportContext, String subreportPath, CatalogItemContext& =subreportContext, String& description, GetReportChunk& =getCompiledDefinition, ParameterInfoCollection& parameters)
at =Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICo=llection.RetrieveSubReport(SubReport subReport, ProcessingContext =processingContext, ProcessingErrorContext subReportErrorContext, Boolean =isProcessingPrefetch)
It is important to know that we use LoadReportDefinition to load RDL for =this kind of ad-hoc report (columns were created on the fly based on =user's selections). If I understand correctly, the LoadReportDefinition =method requires RDL use private data source. I believe the second error =(ItemNotFoundException) was actually caused by the first error (failed =to create the subreport item due to the error while retrieving data =sources).
Since the main report and sub report both use private data source, I =only see one data source was created from report server log. I expect to =see two data sources created, one for main report and one for sub =report. Can this be the reason, or something to do with data source =credential ?
Thanks
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message =news:ktCgbCRtGHA.2500@.TK2MSFTNGXA01.phx.gbl...
> Hi spamme,
> > Thank you for using MSDN Managed Newsgroup Support.
> > From your description, my understanding of this issue is: You could =not see > your subreport and you get the error "Error: Subreport could not be > shown.". If I misunderstood your concern, please feel free to let me =know.
> > I would like to get the Report Error log file to troubleshot this =issue. By > default, the log file is located at \Microsoft SQL Server\<SQL Server > Instance>\Reporting Services\LogFiles. > > Please post the error in the log file so that I could provide further > assistance.
> > Sincerely,
> > Wei Lu
> > Microsoft Online Community Support
> > ==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> > Get notification to my posts through email? Please refer to > =http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#no=
tif
> 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.
> > ==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> (This posting is provided "AS IS", with no warranties, and confers no > rights.)
>
--=_NextPart_000_0007_01C6B59D.95D1DED0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Hi Wei,
Here are the errors from report server =log file: (the two always came together)
We changed to have both main report and =subreport use private data sources, but we were still getting same =error.
w3wp!webserver!1!08/01/2006-16:46:18:: i INFO: Processed =report. Report=3D'/', Stream=3D''w3wp!library!1!08/01/2006-16:49:36:: i =INFO: Call to CreateDataSource( 'MyReport', '/Data Sources', dataSourceDefinition )w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to CreateReport( 'BudgetAdHoc', '/EventReports', =def)w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to SetReportDefinition( '/EventReports/BudgetAdHoc', def )w3wp!library!1!08/01/2006-16:49:39:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found., ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found.w3wp!processing!1!08/01/2006-16:49:39:: e ERROR: An error has =occurred while retrieving datasources for a sub-report. Details: The item '/GenericSubreportEventDetails' cannot be found. Stack =trace: at Microsoft.ReportingServices.Library.RSService.GetCompiledDefinition(Strin=g originalItemPath, String itemPath, ItemType& type, =ReportSnapshot& compiledDefinition, Guid& executionSnapshotID, String& =properties, String& description, Byte[]& secDesc, Guid& reportID, =Int32& execOptions) at Microsoft.ReportingServices.Library.RSService.ProcessingGetDataSources(Ca=talogItemContext reportContext, String subreportPath, CatalogItemContext& =subreportContext, GetReportChunk& getCompiledDefinition, DataSourceInfoCollection& =dataSources) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CheckCreden=tials(Report report, DataSourceInfoCollection dataSources, CatalogItemContext =reportContext, SubReportDataSourcesCallback subReportCallback, =RuntimeDataSourceInfoCollection allDataSources, Int32 subReportLevel, Boolean checkIfUsable, ServerDataSourceSettings serverDatasourceSettings)w3wp!library!1!08/01/2006-16:49:41:: i =INFO: Call to RenderFirst( '' )w3wp!library!1!8/1/2006-16:49:41:: e ERROR: =Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found., ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found.w3wp!processing!1!8/1/2006-16:49:41:: e ERROR: An error has =occurred while processing a sub-report. Details: The item ='/GenericSubreportEventDetails' cannot be found. Stack trace: at Microsoft.ReportingServices.Library.RSService.ProcessingGetSubreport(Cata=logItemContext reportContext, String subreportPath, CatalogItemContext& =subreportContext, String& description, GetReportChunk& getCompiledDefinition, ParameterInfoCollection& parameters) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICo=llection.RetrieveSubReport(SubReport subReport, ProcessingContext processingContext, ProcessingErrorContext subReportErrorContext, Boolean isProcessingPrefetch)
It is important to know that we use LoadReportDefinition to load RDL for this kind of ad-hoc report (columns =were created on the fly based on user's selections). If I understand =correctly, the LoadReportDefinition method requires RDL use private data source. I =believe the second error (ItemNotFoundException) was actually caused by the =first error (failed to create the subreport item due to the error while =retrieving data sources).
Since the main report and sub report =both use private data source, I only see one data source was created =from report server log. I expect to see two data sources created, one for main =report and one for sub report. Can this be the reason, or something to do with =data source credential ?
Thanks
"Wei Lu [MSFT]" wrote in message news:ktCgbCRtGHA.2500@.TK2MSFTNGXA01.phx.gbl...> =Hi spamme,> > Thank you for using MSDN Managed Newsgroup Support.> > From your description, my understanding of =this issue is: You could not see > your subreport and you get the error ="Error: Subreport could not be > shown.". If I misunderstood your =concern, please feel free to let me know.> > I would like to get =the Report Error log file to troubleshot this issue. By > default, the log =file is located at \Microsoft SQL Server\ =Instance>\Reporting Services\LogFiles. > > Please post the error in the log =file so that I could provide further > assistance.> > Sincerely,> > Wei Lu> > Microsoft Online =Community Support> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=> > Get notification to my posts through email? Please refer to > =http://msdn.microsoft.com/subscriptions/managednewsgroups/defaul=t.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 => .> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=> (This posting is provided "AS IS", with no warranties, and confers no > rights.)>

--=_NextPart_000_0007_01C6B59D.95D1DED0--|||Hi spamme,
Thank you for your response.
Would you please provide some sample code of how you use
LoadReportDefinition to load the RDL file? Is the RDL file in the local
file system?
Also, you may try to test whether other main report with the sub-report you
use have the same issue. Please let me know the result.
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.)|||This is a multi-part message in MIME format.
--=_NextPart_000_0015_01C6BA07.8BE13F10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Wei,
Just want to provide a quick update on this issue. According to BOL =http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingservice=
swebservice.rsexecutionservice2005.reportexecutionservice.loadreportdefin=ition.aspx, Subreports and data source references with relative paths are not =supported using this method. However, absolute paths to catalog items =can be used
As soon as we changed to use absolute path, the problem was resolved
Thanks
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message =news:vzBRjwftGHA.2504@.TK2MSFTNGXA01.phx.gbl...
> Hi spamme,
> > Thank you for your response.
> > Would you please provide some sample code of how you use > LoadReportDefinition to load the RDL file? Is the RDL file in the =local > file system?
> > Also, you may try to test whether other main report with the =sub-report you > use have the same issue. Please let me know the result.
> > Sincerely,
> > Wei Lu
> > Microsoft Online Community Support
> > ==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> > Get notification to my posts through email? Please refer to > =http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#no=
tif
> 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.
> > ==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> (This posting is provided "AS IS", with no warranties, and confers no > rights.)
>
--=_NextPart_000_0015_01C6BA07.8BE13F10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Wei,
Just want to provide a quick update =on this issue. According to BOL http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reporti=ngserviceswebservice.rsexecutionservice2005.reportexecutionservice.loadre=portdefinition.aspx,
Subreports and data source references =with relative paths are not supported using this method. However, absolute =paths to catalog items can be used
As soon as we changed to use absolute =path, the problem was resolved
Thanks
"Wei Lu [MSFT]" wrote in message news:vzBRjwftGHA.2504@.TK2MSFTNGXA01.phx.gbl...> =Hi spamme,> > Thank you for your response.> > =Would you please provide some sample code of how you use > =LoadReportDefinition to load the RDL file? Is the RDL file in the local > file =system?> > Also, you may try to test whether other main report with the =sub-report you > use have the same issue. Please let me know the =result.> > Sincerely,> > Wei Lu> > Microsoft =Online Community Support> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=> > Get notification to my posts through email? Please refer to > =http://msdn.microsoft.com/subscriptions/managednewsgroups/defaul=t.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 => .> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=> (This posting is provided "AS IS", with no warranties, and confers no > rights.)>

--=_NextPart_000_0015_01C6BA07.8BE13F10--

Sunday, March 11, 2012

Datalength of unicode and non-unicode types?

I'm using SQL Server 2000. Suppose I'm in Northwind database and
I execute the following query:
SELECT Notes, Datalength(Notes) As 'Text length' FROM Employees
The results of 'Text length' shows 2 X total characters because
Notes is of type ntext (Unicode type).
Q: How to form a query that show the total characters used(in this case
notes/2) provided I'm not sure about the underlying datatype whether
it's Unicode or otherwise?
How to check underlying datatype of a column using T-SQL programmatically?
Regards,
Pedestrian
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200605/1If you know the column type is some string type, you
can try this. I'm guessing that the 0-length substring
calculation will be relatively painless:
SELECT
Notes,
Datalength(Notes)
/CASE WHEN DATALENGTH(SPACE(1)+SUBSTRING(Notes,1,0)
) = 2
THEN 2 ELSE 1 END
FROM Employees
Steve Kass
Drew University
pedestrian via webservertalk.com wrote:

>I'm using SQL Server 2000. Suppose I'm in Northwind database and
>I execute the following query:
>SELECT Notes, Datalength(Notes) As 'Text length' FROM Employees
>The results of 'Text length' shows 2 X total characters because
>Notes is of type ntext (Unicode type).
>Q: How to form a query that show the total characters used(in this case
>notes/2) provided I'm not sure about the underlying datatype whether
>it's Unicode or otherwise?
>How to check underlying datatype of a column using T-SQL programmatically?
>Regards,
>Pedestrian
>
>|||If you just want to count number of characters, use len instead of
datalength. This works for both Unicode and non-Unicode strings.
You can query column information in T-SQL by using the
INFORMATION_SCHEMA.COLUMNS view,
HTH
- Baileys
pedestrian via webservertalk.com wrote:
> I'm using SQL Server 2000. Suppose I'm in Northwind database and
> I execute the following query:
> SELECT Notes, Datalength(Notes) As 'Text length' FROM Employees
> The results of 'Text length' shows 2 X total characters because
> Notes is of type ntext (Unicode type).
> Q: How to form a query that show the total characters used(in this case
> notes/2) provided I'm not sure about the underlying datatype whether
> it's Unicode or otherwise?
> How to check underlying datatype of a column using T-SQL programmatically?
> Regards,
> Pedestrian
>|||Baileys wrote:
> If you just want to count number of characters, use len instead of
> datalength. This works for both Unicode and non-Unicode strings.
However, you need to keep in mind that LEN() excludes the trailing
blanks when counting the number of characters (but DATALENGTH() does
not).
Razvan|||Steve Kass wrote:
> If you know the column type is some string type, you
> can try this. I'm guessing that the 0-length substring
> calculation will be relatively painless:
> SELECT
> Notes,
> Datalength(Notes)
> /CASE WHEN DATALENGTH(SPACE(1)+SUBSTRING(Notes,1,0)
) = 2
> THEN 2 ELSE 1 END
> FROM Employees
Hello, Steve
That's a brilliant trick.
However, I'm not sure why you have used the CASE expression ?
Consider this query:
SELECT
Notes,
Datalength(Notes)
/ DATALENGTH(SPACE(1)+SUBSTRING(Notes,1,0)
)
FROM Employees
Wouldn't this be the same as your query ?
Razvan|||
Razvan Socol wrote:

>Steve Kass wrote:
>
>Hello, Steve
>That's a brilliant trick.
>However, I'm not sure why you have used the CASE expression ?
>Consider this query:
>SELECT
> Notes,
> Datalength(Notes)
> / DATALENGTH(SPACE(1)+SUBSTRING(Notes,1,0)
)
>FROM Employees
>Wouldn't this be the same as your query ?
>Razvan
>
>
Yup. Good catch.
SK|||
Baileys wrote:

> If you just want to count number of characters, use len instead of
> datalength. This works for both Unicode and non-Unicode strings.
But LEN does not accept types ntext and text, which the user required.
SK
> You can query column information in T-SQL by using the
> INFORMATION_SCHEMA.COLUMNS view,
> HTH
> - Baileys
> pedestrian via webservertalk.com wrote:
>|||oops, I missed that part of the question...
- Baileys
Steve Kass wrote:
>
> Baileys wrote:
>
>
> But LEN does not accept types ntext and text, which the user required.
> SK
>|||Thanks for quick replies.... particularly to Steve Kass 'n Razvan Socol ...
.
Best Regards,
Pedestrian
Steve Kass wrote:
>If you know the column type is some string type, you
>can try this. I'm guessing that the 0-length substring
>calculation will be relatively painless:
>SELECT
> Notes,
> Datalength(Notes)
> /CASE WHEN DATALENGTH(SPACE(1)+SUBSTRING(Notes,1,0)
) = 2
> THEN 2 ELSE 1 END
>FROM Employees
>Steve Kass
>Drew University
>
>[quoted text clipped - 14 lines]
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200606/1|||Confused over the following query which return the result 2s:
SELECT Datalength(space(1)+SUBSTRING(Notes,1,0)
) as myCol from employees
Why not the above query return 1s instead of 2s ... ?
I suppose space(1) returns 1 and SUBSTRING(Notes,1,0) as below return 0 as
below...
hence space(1)+SUBSTRING(Notes,1,0) should only returns 1.
This query return me 1... Ok
SELECT Datalength(SPACE(1)) As Slength
This query return me 0s... No problem...
SELECT Datalength(SUBSTRING(Notes,1,0) ) As Length1 FROM Employees
Steve Kass wrote:
>If you know the column type is some string type, you
>can try this. I'm guessing that the 0-length substring
>calculation will be relatively painless:
>SELECT
> Notes,
> Datalength(Notes)
> /CASE WHEN DATALENGTH(SPACE(1)+SUBSTRING(Notes,1,0)
) = 2
> THEN 2 ELSE 1 END
>FROM Employees
>Steve Kass
>Drew University
>
>[quoted text clipped - 14 lines]
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200606/1

dataflow to excel - Convert numbers stored as text to numbers Excel Cell Error

I'm trying to write data to excel from an ssis component to a excel destination.

Even thought I'm writing numerics, every cell gets this error with a green tag:

Convert numbers stored as text to numbers

Excel Cells were all pre-formated to accounting 2 decimal, and if i manually type the exact data Im sending it formats just fine.

I'm hearing this a common problem -

On another project I was able to find a workaround for the web based version of excel, by writing this to the top of the file:

<style>.text { mso-number-format:\@.; } </style>

is there anything I can pre-set in excel (cells are already formated) or write to my file so that numerics are seen as numerics and not text.

Maybe some setting in my write drivers - using sql servers excel destination.

So close.. Thanks for any help or information.

You received some sugestion on your other thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1392693&SiteID=1

Opening new threads for same problem makes more dificult to help you.

Dataflow task -> Error Handling

Hi,
In terms of data flow tasks, when say we load text files into databases.

Is it possible to have it in a way so that if a certain record (line in the text file) fails to load due to watever reason, it gets written to another table, but the rest of the records still get loaded?

I try to do so and end up with the whole data flow task failing and it stalls at the record that had the error and doesn't seem to continue forward.

I just used the red arrow (on failure) and put that to another SQL destination object. But yeah that didnt work.

If someone has a better way of doing so, would be awesome if you can share that.

Cheers

You have to set the 'Access mode' property of 'OleDB DEstination' OpenRowset.It should not be fastload.Then set ErrorOuput as Redirect Row. Now you can get your erroneous rows redirected.

This should do.

|||yup...i didnt know about the accessmode property. that did it. thanks
|||Dear all,

I face the same problem but I didn't find the 'Access mode' property of 'OleDB DEstination' that contain OpenRowset its only contain Tabel and View with Fastload. Where I can find that property ?
And what if the error occured in Flat File Source ? can we still using the same solution ? Thanks in advance.

Best Regards,

Hery|||Dear all,

Please help me on this.

Thanks in advance.

Dataflow task -> Error Handling

Hi,
In terms of data flow tasks, when say we load text files into databases.

Is it possible to have it in a way so that if a certain record (line in the text file) fails to load due to watever reason, it gets written to another table, but the rest of the records still get loaded?

I try to do so and end up with the whole data flow task failing and it stalls at the record that had the error and doesn't seem to continue forward.

I just used the red arrow (on failure) and put that to another SQL destination object. But yeah that didnt work.

If someone has a better way of doing so, would be awesome if you can share that.

Cheers

You have to set the 'Access mode' property of 'OleDB DEstination' OpenRowset.It should not be fastload.Then set ErrorOuput as Redirect Row. Now you can get your erroneous rows redirected.

This should do.

|||yup...i didnt know about the accessmode property. that did it. thanks
|||Dear all,

I face the same problem but I didn't find the 'Access mode' property of 'OleDB DEstination' that contain OpenRowset its only contain Tabel and View with Fastload. Where I can find that property ?
And what if the error occured in Flat File Source ? can we still using the same solution ? Thanks in advance.

Best Regards,

Hery|||Dear all,

Please help me on this.

Thanks in advance.

Thursday, March 8, 2012

Dataflow task -> Error Handling

Hi,
In terms of data flow tasks, when say we load text files into databases.

Is it possible to have it in a way so that if a certain record (line in the text file) fails to load due to watever reason, it gets written to another table, but the rest of the records still get loaded?

I try to do so and end up with the whole data flow task failing and it stalls at the record that had the error and doesn't seem to continue forward.

I just used the red arrow (on failure) and put that to another SQL destination object. But yeah that didnt work.

If someone has a better way of doing so, would be awesome if you can share that.

Cheers

You have to set the 'Access mode' property of 'OleDB DEstination' OpenRowset.It should not be fastload.Then set ErrorOuput as Redirect Row. Now you can get your erroneous rows redirected.

This should do.

|||yup...i didnt know about the accessmode property. that did it. thanks
|||Dear all,

I face the same problem but I didn't find the 'Access mode' property of 'OleDB DEstination' that contain OpenRowset its only contain Tabel and View with Fastload. Where I can find that property ?
And what if the error occured in Flat File Source ? can we still using the same solution ? Thanks in advance.

Best Regards,

Hery|||Dear all,

Please help me on this.

Thanks in advance.

DataFlow suggestion

I am transfering data from a textfile to sql server.I use a data flow task for trasfering my text files.

Here is what i do.

1.Add text file source

What i want to achieve here is if the text file countains the column name in the first row i should delete them and if it does not contain column name in the first row just transfer it.

how can this be achieved?

2.add one more column to my text file which should contain the status(insert or update).

how can this be done?

3.before transfering data ot destination i want to know if the record exists if exists i just want to update it instead of insert.and if new record i want to insert it .and the status in the above new column need to change.

please help...

Not sure without looking at your data, but look into using the conditional split transformation to perform your logic checks. Use a derived column transformation to add a column.|||

sureshv wrote:

1.Add text file source

What i want to achieve here is if the text file countains the column name in the first row i should delete them and if it does not contain column name in the first row just transfer it.

how can this be achieved?

There is a property on the flat file connection manager that you can configure for that (ColumnsNamesInFirstDatarow).

sureshv wrote:

2.add one more column to my text file which should contain the status(insert or update).

how can this be done?

Use a derived column to add extra columns to data flow pipeline

sureshv wrote:

3.before transfering data ot destination i want to know if the record exists if exists i just want to update it instead of insert.and if new record i want to insert it .and the status in the above new column need to change.

There are tons of threads discussing that issue; the most popular is to use Lookup transform against the destination table; if a match occurs means the row already exists; otherwise it does not.

|||

In the first case.

Data is just a text file with column names in the first row.

eg:

name address telno

xxx yyy zzz

xxx sdfdsf sdfsf

But i dont want the column names coming from text file. instead i want to have my own column names(which i can and know to create)

If i transter data as in the text file the column names would appear in the first row.just to get rid of it i want to remove column name from text file.

In second case:

I use derived column to add a column,and conditional split for bad data.

My point is in the new column how should i insert the status(insert) or )update.

what should i use.

|||

There is a property on the flat file connection manager that you can configure for that (ColumnsNamesInFirstDatarow).

I dont want to use this i can have and want to have my own column names.WHich can be done and i know about it.

please look at my reply earlier

|||

sureshv wrote:

My point is in the new column how should i insert the status(insert) or )update.

see if this helps:

http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx

you could add a derived column transform at after each lookup transform and add there a column with the expected value(insert/update)...

Datafiles

I am having trouble moving BLOBs (text fields).
I have a 200Gb database in a single data file and want to split it into 4
even sized files (I have my reasons). To achieve this I plan on adding 3 data
files to the Primary filegroup. From there I will issue a DBCC dbreindex on
all my tables, which effectively recreates the index (or table if its a
clustered index) across all datafiles and I get my even distribution.
My plan comes unstuck when I encounter text fields and other BLOBs (as the
clustered index just contains pointers doesnt it'). How can I move them? Do
I have to do a select into or bcp? Can I just issue a shrink file on the
oringal large file or does that just push pages from the end of that data
file to the beginning and not to other datafiles'
Any suggestions would be great, I don't really want to create another
filegroup just yet.
Thanks :)"Malarb" <Malarb@.discussions.microsoft.com> wrote in message
news:BA0A6D10-4377-4247-A2A3-195FB60B308B@.microsoft.com...
>I am having trouble moving BLOBs (text fields).
> I have a 200Gb database in a single data file and want to split it into 4
> even sized files (I have my reasons). To achieve this I plan on adding 3
> data
> files to the Primary filegroup. From there I will issue a DBCC dbreindex
> on
> all my tables, which effectively recreates the index (or table if its a
> clustered index) across all datafiles and I get my even distribution.
> My plan comes unstuck when I encounter text fields and other BLOBs (as the
> clustered index just contains pointers doesnt it'). How can I move them?
> Do
> I have to do a select into or bcp? Can I just issue a shrink file on the
> oringal large file or does that just push pages from the end of that data
> file to the beginning and not to other datafiles'
> Any suggestions would be great, I don't really want to create another
> filegroup just yet.
I would create a new filegroup with the desired number and layout of files,
mark it as primary, and move all your objects there. Then drop the old
filegroup.
David|||You will need to create a new filegroup so you can create a new table on
this filegroup. Copy the old data to the new table. Drop the old table.
Rename the new tb to the old name. And then shrink the db to reclaim the
space.
--
-oj
"Malarb" <Malarb@.discussions.microsoft.com> wrote in message
news:BA0A6D10-4377-4247-A2A3-195FB60B308B@.microsoft.com...
>I am having trouble moving BLOBs (text fields).
> I have a 200Gb database in a single data file and want to split it into 4
> even sized files (I have my reasons). To achieve this I plan on adding 3
> data
> files to the Primary filegroup. From there I will issue a DBCC dbreindex
> on
> all my tables, which effectively recreates the index (or table if its a
> clustered index) across all datafiles and I get my even distribution.
> My plan comes unstuck when I encounter text fields and other BLOBs (as the
> clustered index just contains pointers doesnt it'). How can I move them?
> Do
> I have to do a select into or bcp? Can I just issue a shrink file on the
> oringal large file or does that just push pages from the end of that data
> file to the beginning and not to other datafiles'
> Any suggestions would be great, I don't really want to create another
> filegroup just yet.
> Thanks :)|||Hi,
I have the same problem, but i´m not a dba expert. How is sintaxe to create
a new table and accurate the it´s will in the new files group.
Could use the following command to creat a copy table'
select * into COPY_TABLE
from SOURCE_TABLE
WHERE 1=0
Thanks
"oj" wrote:
> You will need to create a new filegroup so you can create a new table on
> this filegroup. Copy the old data to the new table. Drop the old table.
> Rename the new tb to the old name. And then shrink the db to reclaim the
> space.
> --
> -oj
>
> "Malarb" <Malarb@.discussions.microsoft.com> wrote in message
> news:BA0A6D10-4377-4247-A2A3-195FB60B308B@.microsoft.com...
> >I am having trouble moving BLOBs (text fields).
> >
> > I have a 200Gb database in a single data file and want to split it into 4
> > even sized files (I have my reasons). To achieve this I plan on adding 3
> > data
> > files to the Primary filegroup. From there I will issue a DBCC dbreindex
> > on
> > all my tables, which effectively recreates the index (or table if its a
> > clustered index) across all datafiles and I get my even distribution.
> >
> > My plan comes unstuck when I encounter text fields and other BLOBs (as the
> > clustered index just contains pointers doesnt it'). How can I move them?
> > Do
> > I have to do a select into or bcp? Can I just issue a shrink file on the
> > oringal large file or does that just push pages from the end of that data
> > file to the beginning and not to other datafiles'
> >
> > Any suggestions would be great, I don't really want to create another
> > filegroup just yet.
> >
> > Thanks :)
>
>|||select/into does not allow you to specify the filegroup. You will need to
create a new table then do update.
e.g.
create table newtab(...) on filegroup
update newtab
set ...= old...
from newtab,old
where newtab.pk=old.pk
-oj
"Fabio Rebelo" <FabioRebelo@.discussions.microsoft.com> wrote in message
news:07896DF0-B18B-4ACB-A854-EFBEE387E32D@.microsoft.com...
> Hi,
> I have the same problem, but i´m not a dba expert. How is sintaxe to
> create
> a new table and accurate the it´s will in the new files group.
> Could use the following command to creat a copy table'
> select * into COPY_TABLE
> from SOURCE_TABLE
> WHERE 1=0
> Thanks
>
> "oj" wrote:
>> You will need to create a new filegroup so you can create a new table on
>> this filegroup. Copy the old data to the new table. Drop the old table.
>> Rename the new tb to the old name. And then shrink the db to reclaim the
>> space.
>> --
>> -oj
>>
>> "Malarb" <Malarb@.discussions.microsoft.com> wrote in message
>> news:BA0A6D10-4377-4247-A2A3-195FB60B308B@.microsoft.com...
>> >I am having trouble moving BLOBs (text fields).
>> >
>> > I have a 200Gb database in a single data file and want to split it into
>> > 4
>> > even sized files (I have my reasons). To achieve this I plan on adding
>> > 3
>> > data
>> > files to the Primary filegroup. From there I will issue a DBCC
>> > dbreindex
>> > on
>> > all my tables, which effectively recreates the index (or table if its a
>> > clustered index) across all datafiles and I get my even distribution.
>> >
>> > My plan comes unstuck when I encounter text fields and other BLOBs (as
>> > the
>> > clustered index just contains pointers doesnt it'). How can I move
>> > them?
>> > Do
>> > I have to do a select into or bcp? Can I just issue a shrink file on
>> > the
>> > oringal large file or does that just push pages from the end of that
>> > data
>> > file to the beginning and not to other datafiles'
>> >
>> > Any suggestions would be great, I don't really want to create another
>> > filegroup just yet.
>> >
>> > Thanks :)
>>

Datafiles

I am having trouble moving BLOBs (text fields).
I have a 200Gb database in a single data file and want to split it into 4
even sized files (I have my reasons). To achieve this I plan on adding 3 dat
a
files to the Primary filegroup. From there I will issue a DBCC dbreindex on
all my tables, which effectively recreates the index (or table if its a
clustered index) across all datafiles and I get my even distribution.
My plan comes unstuck when I encounter text fields and other BLOBs (as the
clustered index just contains pointers doesnt it'). How can I move them? Do
I have to do a select into or bcp? Can I just issue a shrink file on the
oringal large file or does that just push pages from the end of that data
file to the beginning and not to other datafiles'
Any suggestions would be great, I don't really want to create another
filegroup just yet.
Thanks "Malarb" <Malarb@.discussions.microsoft.com> wrote in message
news:BA0A6D10-4377-4247-A2A3-195FB60B308B@.microsoft.com...
>I am having trouble moving BLOBs (text fields).
> I have a 200Gb database in a single data file and want to split it into 4
> even sized files (I have my reasons). To achieve this I plan on adding 3
> data
> files to the Primary filegroup. From there I will issue a DBCC dbreindex
> on
> all my tables, which effectively recreates the index (or table if its a
> clustered index) across all datafiles and I get my even distribution.
> My plan comes unstuck when I encounter text fields and other BLOBs (as the
> clustered index just contains pointers doesnt it'). How can I move them?
> Do
> I have to do a select into or bcp? Can I just issue a shrink file on the
> oringal large file or does that just push pages from the end of that data
> file to the beginning and not to other datafiles'
> Any suggestions would be great, I don't really want to create another
> filegroup just yet.
I would create a new filegroup with the desired number and layout of files,
mark it as primary, and move all your objects there. Then drop the old
filegroup.
David|||You will need to create a new filegroup so you can create a new table on
this filegroup. Copy the old data to the new table. Drop the old table.
Rename the new tb to the old name. And then shrink the db to reclaim the
space.
-oj
"Malarb" <Malarb@.discussions.microsoft.com> wrote in message
news:BA0A6D10-4377-4247-A2A3-195FB60B308B@.microsoft.com...
>I am having trouble moving BLOBs (text fields).
> I have a 200Gb database in a single data file and want to split it into 4
> even sized files (I have my reasons). To achieve this I plan on adding 3
> data
> files to the Primary filegroup. From there I will issue a DBCC dbreindex
> on
> all my tables, which effectively recreates the index (or table if its a
> clustered index) across all datafiles and I get my even distribution.
> My plan comes unstuck when I encounter text fields and other BLOBs (as the
> clustered index just contains pointers doesnt it'). How can I move them?
> Do
> I have to do a select into or bcp? Can I just issue a shrink file on the
> oringal large file or does that just push pages from the end of that data
> file to the beginning and not to other datafiles'
> Any suggestions would be great, I don't really want to create another
> filegroup just yet.
> Thanks |||Hi,
I have the same problem, but i′m not a dba expert. How is sintaxe to create
a new table and accurate the it′s will in the new files group.
Could use the following command to creat a copy table'
select * into COPY_TABLE
from SOURCE_TABLE
WHERE 1=0
Thanks
"oj" wrote:

> You will need to create a new filegroup so you can create a new table on
> this filegroup. Copy the old data to the new table. Drop the old table.
> Rename the new tb to the old name. And then shrink the db to reclaim the
> space.
> --
> -oj
>
> "Malarb" <Malarb@.discussions.microsoft.com> wrote in message
> news:BA0A6D10-4377-4247-A2A3-195FB60B308B@.microsoft.com...
>
>|||select/into does not allow you to specify the filegroup. You will need to
create a new table then do update.
e.g.
create table newtab(...) on filegroup
update newtab
set ...= old...
from newtab,old
where newtab.pk=old.pk
-oj
"Fabio Rebelo" <FabioRebelo@.discussions.microsoft.com> wrote in message
news:07896DF0-B18B-4ACB-A854-EFBEE387E32D@.microsoft.com...[vbcol=seagreen]
> Hi,
> I have the same problem, but im not a dba expert. How is sintaxe to
> create
> a new table and accurate the its will in the new files group.
> Could use the following command to creat a copy table'
> select * into COPY_TABLE
> from SOURCE_TABLE
> WHERE 1=0
> Thanks
>
> "oj" wrote:
>

Data-driven subscription: put parameter in the filename text

Hi all,

I've developed a data driven subscription report. I have a paramete (named "Data") that is a result of my query to the current date. It is working fine.

Now I would like to make one change: In the step4 of the creation of the data-driven report we have the option to give a name to the filename.The name that I gave was TestFile. In this option i'm also able to select the parameter instead of giving the name to the filename. Can I make something like TestFile_ & @.Data? Wich would result in TestFile_01-02-2007? Or the only way is to make, in the query of the paramenter another field with this result?

Thanks in advance.

Marco.

I tried the other option, making it by a query and this is what I want.

Anyway, instead of making this in my query, I couldn't have done this in the text? Like I said TestFile_ & @.Data? This would be interpreted as a string am I right?

Wednesday, March 7, 2012

DataConversion Problem

This is a multi-part message in MIME format.
--=_NextPart_000_0008_01C5F419.25A61BD0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
SQL Server 2000, Win 2000 Access 97
I have an Access FrontEnd and BackEnd
The backend tables have been imported (Data Transformation Services) = into ab SQL Server Database.
Much of the data was not of the type required - e.g. nVarChar needed to = be VarChar
These transformations were carried out using SQL EnterpriseManager > = DesignTable
The Access Front End worked Fine.
PROBLEM
--
For security reasons one tables, Companies, was dropped.
Now after re-importing the table (Data Transformation Services)
and running a script (SQL Query Analyser)
[ example line of script > ALTER TABLE dbo.Companies Alter Column = CompanyName VarChar(50) ]
This reports success.
The datatypes are now reported to be as required (SQL EnterpriseManager = > Design Table)
Inspecting the data in the ACCESS 97 front end is fine
BUT - attempts to update the data give an ERROR
The import of the error is that the ACCESS front end is trying to update = a text field BUT the server is still telling the access Front end that = the datatype is nVarChar [NOT VarChar - as currently reported by SQL = Enterprise Manager]
NOTE - the Access Front End first deletes ALL the tableDefs then = recreates them with an ODBC connection to the Server
All the other tables (apart from Companies) are still updateable as they = were before.
Jim Bunton
--=_NextPart_000_0008_01C5F419.25A61BD0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
SQL Server 2000, Win 2000 Access = 97

I have an Access FrontEnd and = BackEnd
The backend tables have been imported = (Data Transformation Services) into ab SQL Server Database.

Much of the data was not of the type = required - e.g. nVarChar needed to be VarChar

These transformations were carried out = using SQL EnterpriseManager > DesignTable

The Access Front End worked = Fine.

PROBLEM
--
For security reasons one tables, = Companies, was dropped.
Now after re-importing the table (Data Transformation Services)
and running a script (SQL Query Analyser)
[ example line of script > = ALTER TABLE dbo.Companies Alter Column CompanyName VarChar(50) ]This reports success.

The datatypes are now reported to be as = required (SQL EnterpriseManager > Design Table)

Inspecting the data in the ACCESS = 97 front end is fine

BUT - attempts to update = the data give an ERROR
The import of the error is that the = ACCESS front end is trying to update a text field BUT the server is still telling the = access Front end that the datatype is nVarChar [NOT VarChar - = as currently reported by SQL Enterprise Manager]
NOTE - the Access Front End first = deletes ALL the tableDefs then recreates them with an ODBC connection to the = Server
All the other tables (apart from = Companies) are still updateable as they were before.
Jim = Bunton
--=_NextPart_000_0008_01C5F419.25A61BD0--This is a multi-part message in MIME format.
--=_NextPart_000_002A_01C5F42C.B3E69A60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Jim
Do you have a last Service Pack installed on the SQL Server?
Looks strange. I just did some testing and it works just fine
Try to create a table first and then run DTS to update the table.
"Jim Bunton" <jBunton@.BlueYonder.co.uk> wrote in message =news:KWCif.17904$8G6.12386@.fe1.news.blueyonder.co.uk...
SQL Server 2000, Win 2000 Access 97
I have an Access FrontEnd and BackEnd
The backend tables have been imported (Data Transformation Services) =into ab SQL Server Database.
Much of the data was not of the type required - e.g. nVarChar needed =to be VarChar
These transformations were carried out using SQL EnterpriseManager > =DesignTable
The Access Front End worked Fine.
PROBLEM
--
For security reasons one tables, Companies, was dropped.
Now after re-importing the table (Data Transformation Services)
and running a script (SQL Query Analyser)
[ example line of script > ALTER TABLE dbo.Companies Alter Column =CompanyName VarChar(50) ]
This reports success.
The datatypes are now reported to be as required (SQL =EnterpriseManager > Design Table)
Inspecting the data in the ACCESS 97 front end is fine
BUT - attempts to update the data give an ERROR
The import of the error is that the ACCESS front end is trying to =update a text field BUT the server is still telling the access Front end =that the datatype is nVarChar [NOT VarChar - as currently reported by =SQL Enterprise Manager]
NOTE - the Access Front End first deletes ALL the tableDefs then =recreates them with an ODBC connection to the Server
All the other tables (apart from Companies) are still updateable as =they were before.
Jim Bunton
--=_NextPart_000_002A_01C5F42C.B3E69A60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Jim
Do you have a last Service Pack =installed on the SQL Server?
Looks strange. I just did some testing =and it works just fine
Try to create a table first and =then run DTS to update the table.
"Jim Bunton" = wrote in message news:KWCif.=17904$8G6.12386@.fe1.news.blueyonder.co.uk...
SQL Server 2000, Win 2000 Access =97

I have an Access FrontEnd and BackEnd
The backend tables have been imported =(Data Transformation Services) into ab SQL Server Database.

Much of the data was not of the type =required - e.g. nVarChar needed to be VarChar

These transformations were carried =out using SQL EnterpriseManager > DesignTable

The Access Front End worked =Fine.

PROBLEM
--
For security reasons one tables, =Companies, was dropped.
Now after re-importing the table =(Data Transformation Services)
and running a script (SQL Query Analyser)
[ example line of script > = ALTER TABLE dbo.Companies Alter Column CompanyName VarChar(50) ]This reports success.

The datatypes are now reported to be =as required (SQL EnterpriseManager > Design Table)

Inspecting the data in the =ACCESS 97 front end is fine

BUT - attempts to =update the data give an ERROR
The import of the error is that the =ACCESS front end is trying to update a text field BUT the server is still telling =the access Front end that the datatype is nVarChar [NOT =VarChar - as currently reported by SQL Enterprise Manager]
NOTE - the Access Front End first =deletes ALL the tableDefs then recreates them with an ODBC connection to the Server
All the other tables (apart from =Companies) are still updateable as they were before.
Jim Bunton

--=_NextPart_000_002A_01C5F42C.B3E69A60--|||This is a multi-part message in MIME format.
--=_NextPart_000_0009_01C5F42C.4FDF9BC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Thanks for the reply Uri
DownLoaded Service Pack 3
Installed - works
DownLoaded Service Pack 3a (sql2kasp3.exe)
Setup.exe > begins to run - stops on ERROR 145 an error occurred in =the move data process
? Help ? !! Have done a reboot. still no joy
"Uri Dimant" <urid@.iscar.co.il> wrote in message =news:eeBjvvB9FHA.1032@.TK2MSFTNGP11.phx.gbl...
Jim
Do you have a last Service Pack installed on the SQL Server?
Looks strange. I just did some testing and it works just fine
Try to create a table first and then run DTS to update the table.
"Jim Bunton" <jBunton@.BlueYonder.co.uk> wrote in message =news:KWCif.17904$8G6.12386@.fe1.news.blueyonder.co.uk...
SQL Server 2000, Win 2000 Access 97
I have an Access FrontEnd and BackEnd
The backend tables have been imported (Data Transformation Services) =into ab SQL Server Database.
Much of the data was not of the type required - e.g. nVarChar needed =to be VarChar
These transformations were carried out using SQL EnterpriseManager > =DesignTable
The Access Front End worked Fine.
PROBLEM
--
For security reasons one tables, Companies, was dropped.
Now after re-importing the table (Data Transformation Services)
and running a script (SQL Query Analyser)
[ example line of script > ALTER TABLE dbo.Companies Alter Column =CompanyName VarChar(50) ]
This reports success.
The datatypes are now reported to be as required (SQL =EnterpriseManager > Design Table)
Inspecting the data in the ACCESS 97 front end is fine
BUT - attempts to update the data give an ERROR
The import of the error is that the ACCESS front end is trying to =update a text field BUT the server is still telling the access Front end =that the datatype is nVarChar [NOT VarChar - as currently reported by =SQL Enterprise Manager]
NOTE - the Access Front End first deletes ALL the tableDefs then =recreates them with an ODBC connection to the Server
All the other tables (apart from Companies) are still updateable as =they were before.
Jim Bunton
--=_NextPart_000_0009_01C5F42C.4FDF9BC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Thanks for the reply Uri
DownLoaded Service Pack 3
Installed - works
DownLoaded Service Pack 3a (sql2kasp3.exe)
Setup.exe > =begins to run - stops on ERROR 145 an error occurred in the move data =process
? Help ? !! Have done a reboot. =still no joy
"Uri Dimant" wrote in =message news:eeBjvvB9FHA.1032=@.TK2MSFTNGP11.phx.gbl...
Jim

Do you have a last Service Pack =installed on the SQL Server?

Looks strange. I just did some =testing and it works just fine

Try to create a table first and =then run DTS to update the table.


"Jim Bunton" = wrote in message news:KWCif.=17904$8G6.12386@.fe1.news.blueyonder.co.uk...
SQL Server 2000, Win 2000 Access 97

I have an Access FrontEnd and BackEnd
The backend tables have been =imported (Data Transformation Services) into ab SQL Server Database.

Much of the data was not of the =type required - e.g. nVarChar needed to be VarChar

These transformations were carried =out using SQL EnterpriseManager > DesignTable

The Access Front End worked =Fine.

PROBLEM
--
For security reasons one tables, =Companies, was dropped.
Now after re-importing the table =(Data Transformation Services)
and running a script (SQL Query Analyser)
[ example line of script > = ALTER TABLE dbo.Companies Alter Column CompanyName VarChar(50) ]This reports = success.

The datatypes are now reported to =be as required (SQL EnterpriseManager > Design Table)

Inspecting the data in the =ACCESS 97 front end is fine

BUT - attempts to =update the data give an ERROR
The import of the error is that the =ACCESS front end is trying to update a text field BUT the server is still =telling the access Front end that the datatype is nVarChar =[NOT VarChar - as currently reported by SQL Enterprise =Manager]
NOTE - the Access Front End first =deletes ALL the tableDefs then recreates them with an ODBC connection to the Server
All the other tables (apart from =Companies) are still updateable as they were before.
Jim Bunton

--=_NextPart_000_0009_01C5F42C.4FDF9BC0--|||This is a multi-part message in MIME format.
--=_NextPart_000_001B_01C5F447.76A4E2E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Creating table first then loading data works fine - ca now edit data
[update to SP 4 - to SP 3 Ok but SP 3a setup.exe > will not instal - stops wth err 145 'an error occurred =in the move data process']
"Uri Dimant" <urid@.iscar.co.il> wrote in message =news:eeBjvvB9FHA.1032@.TK2MSFTNGP11.phx.gbl...
Jim
Do you have a last Service Pack installed on the SQL Server?
Looks strange. I just did some testing and it works just fine
Try to create a table first and then run DTS to update the table.
"Jim Bunton" <jBunton@.BlueYonder.co.uk> wrote in message =news:KWCif.17904$8G6.12386@.fe1.news.blueyonder.co.uk...
SQL Server 2000, Win 2000 Access 97
I have an Access FrontEnd and BackEnd
The backend tables have been imported (Data Transformation Services) =into ab SQL Server Database.
Much of the data was not of the type required - e.g. nVarChar needed =to be VarChar
These transformations were carried out using SQL EnterpriseManager > =DesignTable
The Access Front End worked Fine.
PROBLEM
--
For security reasons one tables, Companies, was dropped.
Now after re-importing the table (Data Transformation Services)
and running a script (SQL Query Analyser)
[ example line of script > ALTER TABLE dbo.Companies Alter Column =CompanyName VarChar(50) ]
This reports success.
The datatypes are now reported to be as required (SQL =EnterpriseManager > Design Table)
Inspecting the data in the ACCESS 97 front end is fine
BUT - attempts to update the data give an ERROR
The import of the error is that the ACCESS front end is trying to =update a text field BUT the server is still telling the access Front end =that the datatype is nVarChar [NOT VarChar - as currently reported by =SQL Enterprise Manager]
NOTE - the Access Front End first deletes ALL the tableDefs then =recreates them with an ODBC connection to the Server
All the other tables (apart from Companies) are still updateable as =they were before.
Jim Bunton
--=_NextPart_000_001B_01C5F447.76A4E2E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Creating table first then loading data =works fine - ca now edit data
[update to SP 4 - to SP 3 Ok but =SP 3a setup.exe > will not instal - =stops wth err 145 'an error occurred in the move data process']
"Uri Dimant" wrote in =message news:eeBjvvB9FHA.1032=@.TK2MSFTNGP11.phx.gbl...
Jim

Do you have a last Service Pack =installed on the SQL Server?

Looks strange. I just did some =testing and it works just fine

Try to create a table first and =then run DTS to update the table.


"Jim Bunton" = wrote in message news:KWCif.=17904$8G6.12386@.fe1.news.blueyonder.co.uk...
SQL Server 2000, Win 2000 Access 97

I have an Access FrontEnd and BackEnd
The backend tables have been =imported (Data Transformation Services) into ab SQL Server Database.

Much of the data was not of the =type required - e.g. nVarChar needed to be VarChar

These transformations were carried =out using SQL EnterpriseManager > DesignTable

The Access Front End worked =Fine.

PROBLEM
--
For security reasons one tables, =Companies, was dropped.
Now after re-importing the table =(Data Transformation Services)
and running a script (SQL Query Analyser)
[ example line of script > = ALTER TABLE dbo.Companies Alter Column CompanyName VarChar(50) ]This reports = success.

The datatypes are now reported to =be as required (SQL EnterpriseManager > Design Table)

Inspecting the data in the =ACCESS 97 front end is fine

BUT - attempts to =update the data give an ERROR
The import of the error is that the =ACCESS front end is trying to update a text field BUT the server is still =telling the access Front end that the datatype is nVarChar =[NOT VarChar - as currently reported by SQL Enterprise =Manager]
NOTE - the Access Front End first =deletes ALL the tableDefs then recreates them with an ODBC connection to the Server
All the other tables (apart from =Companies) are still updateable as they were before.
Jim Bunton

--=_NextPart_000_001B_01C5F447.76A4E2E0--

Sunday, February 26, 2012

DataBinding to radio button

I have a windows form containing some text boxes and radio buttons bount to an SQL Server database, with code like the following:

this.tbBorrowerLastName.DataBindings.Add (new Binding("Text", dsData.Tables["Results"],"BorrowerLastName"();

this.rbMale.DataBindings.Add(new Binding("Checked", dsData.Tables["Results"],"Male"))

If I add a new row and try to move there using the code below, nothing happens (neither movement to a new position nor error message), unless I remove the radio button bindings. (The same thing occurs if I attempt to move to any record that has a null value in the database field for a radio button).

myLastRow = dsData.Tables["Results"].NewRow();

dsData.Tables["Results"].Rows.Add(myLastRow);

I attempt to move by changing the value of the position property of the BindingContext object.

How can I retain the radio button bindings and still be able to add and move to a new row?

Any help would be appreciated.

I was able to figure my own solution.

The problem was a null value for the checked property of the radio buttons. I tried adding a default value to Visual Studio and to the database, but neither of those solved the problem.

Inbetween the two lines of code in my earlier post (beginning myLastRow and dsData.Tables respectively), I added:

myLastRow["Male"]=true;

myLastRow["Female"]=false;

Problem solved.