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

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

"Failed to get schema!"

I have entered an sql demand in the wizard of a grid view for a table (on a form). But i cannot go any further because it gives me the message ... "Failed to get schema!"...

A frined came over by and with him, it worked...

the sql is correct, it calculates sums based on the dates of another table... let me show it:


INSERT INTO SumeU
(ID_var_u, s_x, s_y, s_xx, s_yy, s_xy)
SELECT ID_var_u, SUM(val_x) AS sx, SUM(val_y) AS sy, SUM(val_x * val_x) AS sxx, SUM(val_y * val_y) AS syy, SUM(val_x * val_y) AS sxy
FROM DateU
GROUP BY ID_var_u

"ID_var_u" connects the two tables to another one called "model" (where it is primary key)

Now... please help me... again!

Sounds like a security issue, I'll move your question to a SQL forum for a better answer...
|||

The message you mentioned does not resemble any SQL Server error message. Is that copied verbatim or from memory? Can you post the actual error message?

Thanks
Laurentiu