Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Thursday, March 22, 2012

(Error) Conversion from "DT_TEXT" to "DT_WSTR" is not supported.

Below is the error I get when trying to convert a Visual FoxPro memo field to a DT_WSTR (4000 ) in a SQL table. It does not let me convert a DT_TEXT to a DT_WSTR.

Thank in advance

TITLE: Editing Component

The component is not in a valid state. The validation errors are:

Error at NMF [Data Conversion [6328]]: Conversion from "DT_TEXT" to "DT_WSTR" is not supported.

Do you want the component to fix these errors automatically?

BUTTONS:

&Yes

&No

Cancel

Long Object types such as DT_TEXT have limited conversion support. Since DT_TEXT is non-unicode, likely you would have to convert in two steps:

DT_TEXT -> DT_STR using same codepage

DT_STR -> DT_WSTR.

|||

Mark's spot on of course. Stick the following expression into a Derived Column Component

(DT_WSTR, 4000) (DT_STR, 4000, 1252) [ColumnName]

-Jamie

Tuesday, March 20, 2012

"too many fields defined" error when previewing xls

Anyone know why I am getting this?

===================================

There was an error displaying the preview. (Microsoft Visual Studio)

===================================

Too many fields defined. (Microsoft JET Database Engine)

Program Location:

at Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.Connections.SQLTaskConnectionOleDbClass.ExecuteStatement(Int32 resultType, Boolean isStoredProc, UInt32 dwTimeOut)
at Microsoft.DataTransformationServices.Design.PipelineUtils.ShowDataPreview(String sqlStatement, ConnectionManager connectionManager, Control parentWindow, IServiceProvider serviceProvider, IDTSExternalMetadataColumnCollection90 externalColumns)
at Microsoft.DataTransformationServices.DataFlowUI.DataFlowConnectionPage.previewButton_Click(Object sender, EventArgs e)



A wild stab in the dark: You have to many fields? How many do you have? A clue would help determine if it is a problem of indeed a limitation..|||31 columns on the sheet that I am importing from.|||Obviously 31 is not to many. You have 31 columns with data in. Do you perhaps have any columns with a space or some other text in it right at the end of the document. Like at column ZZ?

I can create a sheet with 32 columns in it and it is fine. Adding spaces to columns after that causes the same error.

I suggest copying the columns you want out, pasting them in a new sheet and try that.|||the sheet has autofilter set on, could that be the cause?|||I don't know. Remove it and see.

Sunday, March 11, 2012

"Override Default" button in Properties->Parameters section

I wrote a report in Visual Studio with some parameters that I gave default values to in the report definition. I deployed it out to the report server and when I look at the report Properties, Parameters section to see the default values. Instead of seeing all of the default values, I see a bunch of "Override Default" buttons. When you click the buttons, you get a blank text box in which to enter a new value.

Someone before me created a report with default values and the parameters section of that report has text boxes with the default values in them.

Does anyone know how to have the default values show up rather than those "Override Default" buttons?

Thanks.

Somebody must know what I am talking about...|||

I have a hard time believing no one knows about this...

Is my problem not clear? Somebody please ask a question if you don't understand!

|||

I know what you are talking about, but I don't think there is a setting to have it show the values.

Jarret

|||

That makes it seem like random behavior then, which is not really an acceptable explanation.

I'm looking at one report that was written a little while back that will show you the default values in text boxes you can edit, and then there's this other report that I just wrote that will only show you the "Override Default" buttons. When you click them, then you get editable text boxes, but it won't show you what the original default value was.

Is there anyone else out there that can take a stab at it please? Thank you.

|||

Hmmmm...

I just created a simple report with a default parameter and it showed the correct default value instead of the 'Override Default' button. Maybe it has something to do with which version of RS you created the report under (RS2000, RS2005 RTM, SP1, SP2) versus which version you're trying to view it under.

Like you, I have seen this before.

Jarret

|||

I think that it is not "random behavior". As I know the behavior is:

1. If default value isn't query-based and not an expression - you will see original default value

2. If default value isn't query-based but an expression - you will see "Override Default" button instead of expression result

3. If default value is query-based - you will see text "Query Based"

|||

Alright, now we're talking. This is the kind of answer I was looking for, someone who knows the behavior!

So in the past I have had the default values be expressions. For this particular report, I just plugged in numbers. However, I put them in the following format: =2.0. Would that be considered an expression instead of just a value?

|||

miguelito928 wrote:

Alright, now we're talking. This is the kind of answer I was looking for, someone who knows the behavior!

So in the past I have had the default values be expressions. For this particular report, I just plugged in numbers. However, I put them in the following format: =2.0. Would that be considered an expression instead of just a value?

I'm pretty sure you just have to select a default value in the parameters option. I can check when I get to work if you don't confirm this to be true until then Wink

Here's how I believe it works:

-> Add a new parameter called CategoryId, for example;

-> In the values list I'm guessing you'll retrieve them from a query that returns at least an Id and a Label;

-> In the option below the values list you have the option to add a default value, which can also be returned by a query.

Basicly what this 3 item list means is that let's imagin you have a query that returns these values:

1 - Meat

2 - Fish

3 - Fruit

It's a perfect query for your values list! Now, for the default value selection you would want it to be something like:

SELECT C.Id, C.Alias FROM Categories C WHERE C.Default = 1;

This query would return you the default category to use in your report parameter. Something like this:

1 - Meat

Best regards,

Ahkaru

|||

No, your post wasn't helpful at all. I'm not getting my default values from queries.

I am setting the default value of my parameter to "=2.0". This seems to be a non-queried expression, which would explain why I am getting an "Override Default" button instead of a text box with the value in it. The type of my parameters are floats by the way. I just noticed that the report written by someone else has strings and the default values are entered in without the equals sign in front.

So I decided to try and remove the equals signs and now it is showing that there are no default values. Is there no way to enter non-expression non-queried values from the Visual Studio report builder?

|||Ok, I get it to work if you leave all the default values blank and then fill them in through the Report Manager console after you deploy the report. The only way to deploy the report with default values is using expressions and putting equals signs in front, which causes "Override Default" buttons. Thank you to Andrey for his knowledge of the behavior.

"Override Default" button in Properties->Parameters section

I wrote a report in Visual Studio with some parameters that I gave default values to in the report definition. I deployed it out to the report server and when I look at the report Properties, Parameters section to see the default values. Instead of seeing all of the default values, I see a bunch of "Override Default" buttons. When you click the buttons, you get a blank text box in which to enter a new value.

Someone before me created a report with default values and the parameters section of that report has text boxes with the default values in them.

Does anyone know how to have the default values show up rather than those "Override Default" buttons?

Thanks.

Somebody must know what I am talking about...|||

I have a hard time believing no one knows about this...

Is my problem not clear? Somebody please ask a question if you don't understand!

|||

I know what you are talking about, but I don't think there is a setting to have it show the values.

Jarret

|||

That makes it seem like random behavior then, which is not really an acceptable explanation.

I'm looking at one report that was written a little while back that will show you the default values in text boxes you can edit, and then there's this other report that I just wrote that will only show you the "Override Default" buttons. When you click them, then you get editable text boxes, but it won't show you what the original default value was.

Is there anyone else out there that can take a stab at it please? Thank you.

|||

Hmmmm...

I just created a simple report with a default parameter and it showed the correct default value instead of the 'Override Default' button. Maybe it has something to do with which version of RS you created the report under (RS2000, RS2005 RTM, SP1, SP2) versus which version you're trying to view it under.

Like you, I have seen this before.

Jarret

|||

I think that it is not "random behavior". As I know the behavior is:

1. If default value isn't query-based and not an expression - you will see original default value

2. If default value isn't query-based but an expression - you will see "Override Default" button instead of expression result

3. If default value is query-based - you will see text "Query Based"

|||

Alright, now we're talking. This is the kind of answer I was looking for, someone who knows the behavior!

So in the past I have had the default values be expressions. For this particular report, I just plugged in numbers. However, I put them in the following format: =2.0. Would that be considered an expression instead of just a value?

|||

miguelito928 wrote:

Alright, now we're talking. This is the kind of answer I was looking for, someone who knows the behavior!

So in the past I have had the default values be expressions. For this particular report, I just plugged in numbers. However, I put them in the following format: =2.0. Would that be considered an expression instead of just a value?

I'm pretty sure you just have to select a default value in the parameters option. I can check when I get to work if you don't confirm this to be true until then Wink

Here's how I believe it works:

-> Add a new parameter called CategoryId, for example;

-> In the values list I'm guessing you'll retrieve them from a query that returns at least an Id and a Label;

-> In the option below the values list you have the option to add a default value, which can also be returned by a query.

Basicly what this 3 item list means is that let's imagin you have a query that returns these values:

1 - Meat

2 - Fish

3 - Fruit

It's a perfect query for your values list! Now, for the default value selection you would want it to be something like:

SELECT C.Id, C.Alias FROM Categories C WHERE C.Default = 1;

This query would return you the default category to use in your report parameter. Something like this:

1 - Meat

Best regards,

Ahkaru

|||

No, your post wasn't helpful at all. I'm not getting my default values from queries.

I am setting the default value of my parameter to "=2.0". This seems to be a non-queried expression, which would explain why I am getting an "Override Default" button instead of a text box with the value in it. The type of my parameters are floats by the way. I just noticed that the report written by someone else has strings and the default values are entered in without the equals sign in front.

So I decided to try and remove the equals signs and now it is showing that there are no default values. Is there no way to enter non-expression non-queried values from the Visual Studio report builder?

|||Ok, I get it to work if you leave all the default values blank and then fill them in through the Report Manager console after you deploy the report. The only way to deploy the report with default values is using expressions and putting equals signs in front, which causes "Override Default" buttons. Thank you to Andrey for his knowledge of the behavior.

"Override Default" button in Properties->Parameters section

I wrote a report in Visual Studio with some parameters that I gave default values to in the report definition. I deployed it out to the report server and when I look at the report Properties, Parameters section to see the default values. Instead of seeing all of the default values, I see a bunch of "Override Default" buttons. When you click the buttons, you get a blank text box in which to enter a new value.

Someone before me created a report with default values and the parameters section of that report has text boxes with the default values in them.

Does anyone know how to have the default values show up rather than those "Override Default" buttons?

Thanks.

Somebody must know what I am talking about...|||

I have a hard time believing no one knows about this...

Is my problem not clear? Somebody please ask a question if you don't understand!

|||

I know what you are talking about, but I don't think there is a setting to have it show the values.

Jarret

|||

That makes it seem like random behavior then, which is not really an acceptable explanation.

I'm looking at one report that was written a little while back that will show you the default values in text boxes you can edit, and then there's this other report that I just wrote that will only show you the "Override Default" buttons. When you click them, then you get editable text boxes, but it won't show you what the original default value was.

Is there anyone else out there that can take a stab at it please? Thank you.

|||

Hmmmm...

I just created a simple report with a default parameter and it showed the correct default value instead of the 'Override Default' button. Maybe it has something to do with which version of RS you created the report under (RS2000, RS2005 RTM, SP1, SP2) versus which version you're trying to view it under.

Like you, I have seen this before.

Jarret

|||

I think that it is not "random behavior". As I know the behavior is:

1. If default value isn't query-based and not an expression - you will see original default value

2. If default value isn't query-based but an expression - you will see "Override Default" button instead of expression result

3. If default value is query-based - you will see text "Query Based"

|||

Alright, now we're talking. This is the kind of answer I was looking for, someone who knows the behavior!

So in the past I have had the default values be expressions. For this particular report, I just plugged in numbers. However, I put them in the following format: =2.0. Would that be considered an expression instead of just a value?

|||

miguelito928 wrote:

Alright, now we're talking. This is the kind of answer I was looking for, someone who knows the behavior!

So in the past I have had the default values be expressions. For this particular report, I just plugged in numbers. However, I put them in the following format: =2.0. Would that be considered an expression instead of just a value?

I'm pretty sure you just have to select a default value in the parameters option. I can check when I get to work if you don't confirm this to be true until then Wink

Here's how I believe it works:

-> Add a new parameter called CategoryId, for example;

-> In the values list I'm guessing you'll retrieve them from a query that returns at least an Id and a Label;

-> In the option below the values list you have the option to add a default value, which can also be returned by a query.

Basicly what this 3 item list means is that let's imagin you have a query that returns these values:

1 - Meat

2 - Fish

3 - Fruit

It's a perfect query for your values list! Now, for the default value selection you would want it to be something like:

SELECT C.Id, C.Alias FROM Categories C WHERE C.Default = 1;

This query would return you the default category to use in your report parameter. Something like this:

1 - Meat

Best regards,

Ahkaru

|||

No, your post wasn't helpful at all. I'm not getting my default values from queries.

I am setting the default value of my parameter to "=2.0". This seems to be a non-queried expression, which would explain why I am getting an "Override Default" button instead of a text box with the value in it. The type of my parameters are floats by the way. I just noticed that the report written by someone else has strings and the default values are entered in without the equals sign in front.

So I decided to try and remove the equals signs and now it is showing that there are no default values. Is there no way to enter non-expression non-queried values from the Visual Studio report builder?

|||Ok, I get it to work if you leave all the default values blank and then fill them in through the Report Manager console after you deploy the report. The only way to deploy the report with default values is using expressions and putting equals signs in front, which causes "Override Default" buttons. Thank you to Andrey for his knowledge of the behavior.

Thursday, March 8, 2012

"lenght cannot be less than zero. Parameter name : lenght"

I'm using Visual Studio 2005, and when i try to drop a table from a data source( SQL Mobile database), to a new or existing form, always occors the error ""lenght cannot be less than zero. Parameter name : lenght"" , my project has more than one forms.
If i make the same steps on a new project with only one form, i can drop the same table without problems.
Anyone can help with this problem?

best regards,

Pedro Nogueira

Pedro,

It sounds like you are using the drag and drop data binding in a Windows Forms application using SQL Mobile as the data source?

First I recommend ensuring that you are running VS2005 Service Pack 1. If you are or still have this issue after upgrading, to recreate

this, we would need some insight into your database schema and how you are doing the drag and drop onto the form (are you dropping

the whole table? are you bound to a datagrid or to another control, etc)

What I'm saying is that I don't hear of anyone having problems with drag & drop of SQL Mobile/SQL CE tables onto forms with

VS2005 SP1, so you either have a bad install or have indeed found a bug. Happy to help you with that but would need more info

on your database and how you're doing the binding.

Darren Shaffer

Tuesday, March 6, 2012

"Enable user SQL instances"

Hi I have Visual Studio 2005 with SP1 installed, and I want to install the Management Studio. I tried many times installing that and I always got the same problem, which is when I try to create a database in VS I just don’t get trough as I used to. A message appears saying that I’ve to enable some estance. So to resolve the problem I saw if is everything ok with the SQL Server, which seemed to be fine, but I couldn’t start the Report service.

Now I just formatted the computer and I’m afraid to happen all over again. May be the version with only the Management would be fine, I don’t know if it adds something beside of that.

Thank you very much.

After installing Express, you need to explicitly enable remote connections. Is this the issue you are seeing? If not, please supply an exact error message or a log snippet showing the problem.

Thanks,
Sam Lester (MSFT)

|||

Was about "Enable user SQL instances" and the Report Service didn’t started too.

How do I enable this remote connections?

And in the instalation, Should I Add a user to the SQL Server Administration Role?

And also in the step "ready to install" of the SQL Server SP2 shows the following:

The following components will be installed:

· SQL Server Database Services (Upgrade)

(Database Services, Replication, Full-Text Search)

· Reporting Services

(Reporting Services, Report Manager)

· Client Components (Upgrade)

(Connectivity Components, Management Studio Express)

Warning: Setup found that the following components that already exist are at a different service pack level than the components being installed.

Components: Microsoft SQL Server 2005 Tools Express Edition, Microsoft SQL Server 2005 Express Edition (SQLEXPRESS)

After completing setup, you must download and apply the latest SQL Server 2005 service pack to all the components.

Sunday, February 19, 2012

<Select all> disappear on server

Hello.
I have a parameter with multi value option.
When I run the report in Visual studio, The first value in the drop
down of this parameter is (Select All).
When I check this option it check all the other values for this
parameter and when I unCheck this value it uncheck all the ther values
for this parameter.
The problem is thet when I'm publishing the report to the server and
then open it in IE the (Select All) value does't appear and I only get
all the other values.
Any body know how to fix this?
Thanks.On Nov 27, 11:08 pm, nicknack <roezo...@.gmail.com> wrote:
> Hello.
> I have a parameter with multi value option.
> When I run the report in Visual studio, The first value in the drop
> down of this parameter is (Select All).
> When I check this option it check all the other values for this
> parameter and when I unCheck this value it uncheck all the ther values
> for this parameter.
> The problem is thet when I'm publishing the report to the server and
> then open it in IE the (Select All) value does't appear and I only get
> all the other values.
> Any body know how to fix this?
> Thanks.
Hi
It might be a service pack issue, here's a link to Microsoft.
http://download.microsoft.com/download/2/B/5/2B5E5D37-9B17-423D-BC8F-B11ECD4195B4/WhatsNewSQL2005SP2.htm

Monday, February 13, 2012

'Real only' Cells in SQL Server Management Studio / VS 2005

I have been using both SQL Server Management Studio and the Server Explorer of Visual Studio 2005 to populate my database tables as I write my application. Basically, I right-click on a table name and select "Open Table' in SMS and select 'View Table Data' in VS 2005. From there I normally just edit data as needed.

Today, I open up a particular table and one column of my table is made read-only, meaning I cannot update that cell in any records and I cannot add any new records. I can tell this column is read-only because the data is faded and 'Cell is Read only' is visible in the status pane under the results when I mouse-over that column. These read-only columns seem to pop-up almost at random. At work the other day a similar thing happened to anther table I was trying to modify.

It just so happens that the read-only column is the Primary Key of this particular table, but even when I remove the Primary Key designation I cannot edit data in this column. In addition, I have other tables with Primary Keys and I have no trouble updating data in those table columns.

This most certainly has me pulling my hair out and have been searching online for two days now trying to find the cause of this. Any help would be appreciated.

IMHO editing data directly to the table using the SSMS or VS has always downside for having issues with data commit. You will be able to control the transaction commit or rollback is the biggest advantage in using TSQL instead. THe behaviour you are getting is opening up in VS is considered as a view where updates are not allowed, fyi http://msdn2.microsoft.com/en-us/library/ms172022(VS.80).aspx and may be look at the properties to see update speicification to set it to UPDATE.

|||Thanks for the reply. According to this http://msdn2.microsoft.com/en-us/library/sb0bay6k(VS.80).aspx I'm doing it exactly as they explain. At this point I just want to insert a farking row and I don't care how I do it. I've tried to write straight queries and can't even get that to work. I've written command line queries for 4 years now so I know how to write SQL, but I've been screwing with this application for 2 days now just trying to insert a row, its beyond ridiculous. I still cannot find a single resource online that explains to my why I have an entire column that is read-only.

Someone for the love of God just tell me how to insert a row using this steaming pile of BS called Micrrosoft SQL Server Management Studio (or VS 2005). I have a table that looks like this:

StatID int (Primary Key)
SeasonCode char(4)
PlayerID int
StatCode char(3)
StatValue float

and all I want to do is insert a record. Someone please tell me how the fark to insert a row into this table. I don't care what it takes. The column StatID has its Identify Specification column set to 'Yes'.
|||

I had the exact same problem and found out what was causing it in my case.

I started with 'Open Table' which I then wanted to filter so I opened criteria pane. This showed '*' in the columns selected - fine, that's what I expected.

I then selected a specific column to create a filter but didn't bother to unclick the 'display' column and that column became Read Only in the results set.

When I unclicked the 'display' option for the filtered column, and executed it again, the column was editable.

I haven't had time to play around with this but it looks to me that SSMS cannot handle editing on a column that is displayed twice.

Don't ever remember having that problem in EM.

|||

When I unclicked the 'display' option for the filtered column

I meant the 'Output' option