Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / January 2008

Tip: Looking for answers? Try searching our database.

Help With MS SQL Error: The value's length for key 'data source'     exceeds it's limit of '128'.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Loogie - 21 Jan 2008 12:12 GMT
have an .sdf database (MS SQL 2005 Compact)  that was created on a
pocket pc. It now resides on the desktop. I wanted to open it and edit
it on the desktop. I am developing with Vb.2005.

I use the same connection string syntax that I use on the Pocket PC
but I get the error:

'The value's length for key 'data source' exceeds it's limit of
'128'.' from the code:

DESKTOP CODE: - Does not work
Dim saveconn As New SqlConnection("Data Source =" &
Application.StartupPath & "\Projects\" &
lvProj.Items(lvProj.SelectedIndices(0)).Text & "\Tally\" &
lvProj.Items(lvProj.SelectedIndices(0)).Text & ".sdf")
       saveconn.Open()

PocketPC CODE: - Does work
Dim saveconn As New SqlCEConnection("Data Source = My Documents
\Projects\" & lvProj.Items(lvProj.SelectedIndices(0)).Text & "\Tally\"
& lvProj.Items(lvProj.SelectedIndices(0)).Text & ".sdf")
       saveconn.Open()

So I do not understand my error. How do I do this? I have MS SQL
Server 2005 and MS SQL Server Express (which is what I want to use)

I use the following imports:

Imports System.Data
Imports System.Data.Common.DbConnection
Imports System.Data.SqlClient
Imports System.Data.SqlDbType
Imports System.Data.SqlTypes

I am new to this so please be patient with this ole dog!

:L
Please help

Thanks

PBLack
Ginny Caughey [MVP] - 21 Jan 2008 12:22 GMT
Loogie,

If you want to open the SQL Compact sdf file on the desktop, you need to use
the System.Data.SqlServerCe namespace for the desktop instead of SqlClient,
which is for SQL Server.

Signature

Ginny Caughey
Device Application Development MVP
www.wasteworks.com
Software for Solid Waste Management

> have an .sdf database (MS SQL 2005 Compact)  that was created on a
> pocket pc. It now resides on the desktop. I wanted to open it and edit
[quoted text clipped - 38 lines]
>
> PBLack
Loogie - 21 Jan 2008 12:35 GMT
On Jan 21, 8:22 am, "Ginny Caughey [MVP]"
<ginny.caughey.onl...@wasteworks.com> wrote:
> Loogie,
>
[quoted text clipped - 49 lines]
>
> > PBLack

I tried that but It says there are no members when I add the SQL Ce
Client. Can you explain how I do that

Thanks

:L
Loogie - 21 Jan 2008 12:49 GMT
On Jan 21, 8:22 am, "Ginny Caughey [MVP]"
<ginny.caughey.onl...@wasteworks.com> wrote:
> Loogie,
>
[quoted text clipped - 49 lines]
>
> > PBLack

I should further explain that when I click the 'Add References'
button, System.Data.SqlServerCe is not there so I can not get it to
work. I tried to find a download of System.Data.SqlServerCe 9.0.242.0
as I saw in another post that this was the current one. But I am not
even sure that is the problem because I think I have my install
current. I am on XP SP2.

This has been bugging me for a day now and I need to get past it.

Any help appreciated

Thanks

:L
Loogie - 21 Jan 2008 12:55 GMT
> On Jan 21, 8:22 am, "Ginny Caughey [MVP]"
>
[quoted text clipped - 71 lines]
>
> :L

I found it on my computer but the version is 3.0.5300.0 So now I have
to find the right one. I looked in Microsoft but could not find it. Do
you have a link?

Thanks

:L
Ginny Caughey [MVP] - 21 Jan 2008 13:04 GMT
It sounds like you don't have the desktop components for SQLce installed for
some reason. I'd try installing SQL Compact 3.1:
http://www.microsoft.com/downloads/details.aspx?FamilyID=85e0c3ce-3fa1-453a-8ce9
-af6ca20946c3&displaylang=en


Note that if your sdf file is SQLce 2.0 and not 3 (you didn't say), that you
won't be able to access it on the desktop other than by using a 3rd party
product. Which version of the Compact Framework does your app use?

Signature

Ginny Caughey
Device Application Development MVP
www.wasteworks.com
Software for Solid Waste Management

> On Jan 21, 8:22 am, "Ginny Caughey [MVP]"
> <ginny.caughey.onl...@wasteworks.com> wrote:
[quoted text clipped - 68 lines]
>
> :L
Loogie - 21 Jan 2008 13:15 GMT
On Jan 21, 9:04 am, "Ginny Caughey [MVP]"
<ginny.caughey.onl...@wasteworks.com> wrote:
> It sounds like you don't have the desktop components for SQLce installed for
> some reason. I'd try installing SQL Compact 3.1:http://www.microsoft.com/downloads/details.aspx?FamilyID=85e0c3ce-3fa...
[quoted text clipped - 7 lines]
> Device Application Development MVPwww.wasteworks.com
> Software for Solid Waste Management

I already have SQL Compact 3.1 installed so I assume I have a version
3 sdf. How do I tell for sure? Just to be sure that I had the SQL 3.1
compact installed, I downloaded and installed it again from the link
you gave. It asked if I wanted to remove or repair, so I clicked
repair and it did. Next I went back into my app code and there is
still no reference available.

This is driving me crazy.

:L
Ginny Caughey [MVP] - 21 Jan 2008 13:29 GMT
I have never used VB 2005 and have only use Visual Studio 2005/ 2008, etc.
So I don't know if that is the source of your problem. Usually the reason
you can't add a reference is that you are targeting the wrong platform. For
example, you are building a desktop app here, right?

Signature

Ginny Caughey
Device Application Development MVP
www.wasteworks.com
Software for Solid Waste Management

> On Jan 21, 9:04 am, "Ginny Caughey [MVP]"
> <ginny.caughey.onl...@wasteworks.com> wrote:
[quoted text clipped - 23 lines]
>
> :L
Loogie - 21 Jan 2008 13:39 GMT
On Jan 21, 9:29 am, "Ginny Caughey [MVP]"
<ginny.caughey.onl...@wasteworks.com> wrote:
> I have never used VB 2005 and have only use Visual Studio 2005/ 2008, etc.
> So I don't know if that is the source of your problem. Usually the reason
[quoted text clipped - 33 lines]
>
> > :L

Yes I am developing a desktop ap. You are correct. And let me clarify.
I have VS Studio 2005 SP1 installed and am writing my app in VB.Net. I
should have been more clear. Sorry for that.

:L
Ginny Caughey [MVP] - 21 Jan 2008 14:29 GMT
Loogie,

You should be able to just use the Add Reference dialog to add the correct
desktop reference then. Since this isn't working for you, probably
reinstalling SQL Compact is the next thing to try.

Signature

Ginny Caughey
Device Application Development MVP
www.wasteworks.com
Software for Solid Waste Management

> On Jan 21, 9:29 am, "Ginny Caughey [MVP]"
> <ginny.caughey.onl...@wasteworks.com> wrote:
[quoted text clipped - 46 lines]
>
> :L
Loogie - 21 Jan 2008 17:00 GMT
On Jan 21, 10:29 am, "Ginny Caughey [MVP]"
<ginny.caughey.onl...@wasteworks.com> wrote:
> Loogie,
>
[quoted text clipped - 6 lines]
> Device Application Development MVPwww.wasteworks.com
> Software for Solid Waste Management

Hi Again

I don't know what to do. I have done as you have suggested and still
nothing. I don't know what it going on because it is there for my
Pocket PC Aps just not for my Desktop Aps. Windows update does not
suggest anything else...yet it does not work. Even when I add the file
manually through 'Add Existing Item' it is not recognized.

I am at wits end with this. I have had this problem for over 48 hours
now and am dead in the water with my project unless someone can come
up with a suggestion that would get this working for me.

:L
Ginny Caughey [MVP] - 21 Jan 2008 17:48 GMT
Did you try uninstalling and reinstalling SQL Compact? You are targetting
Compact Framework 2.0, right?

Signature

Ginny Caughey
Device Application Development MVP
www.wasteworks.com
Software for Solid Waste Management

> On Jan 21, 10:29 am, "Ginny Caughey [MVP]"
> <ginny.caughey.onl...@wasteworks.com> wrote:
[quoted text clipped - 23 lines]
>
> :L
Ginny Caughey [MVP] - 21 Jan 2008 17:55 GMT
Oops - desktop should be targetting .NET 2.0.

Signature

Ginny Caughey
Device Application Development MVP
www.wasteworks.com
Software for Solid Waste Management

> Did you try uninstalling and reinstalling SQL Compact? You are targetting
> Compact Framework 2.0, right?
[quoted text clipped - 26 lines]
>>
>> :L
Loogie - 21 Jan 2008 18:01 GMT
On Jan 21, 1:48 pm, "Ginny Caughey [MVP]"
<ginny.caughey.onl...@wasteworks.com> wrote:
> Did you try uninstalling and reinstalling SQL Compact? You are targetting
> Compact Framework 2.0, right?
[quoted text clipped - 17 lines]
> >> Device Application Development MVPwww.wasteworks.com
> >> Software for Solid Waste Management

Ginny

I finally got it. I installed XP Service Pack 3 and there it was. Not
sure what SP 3 had to do with it but I am not going to complain. At
least now I can get back to work.

Also, thank you for taking time to help me out with this. It is people
like you that make the world a better place. Your commitment to
helping others is commendable!

:L
Ginny Caughey [MVP] - 21 Jan 2008 18:09 GMT
Glad to help. I especially like problems that have solutions. ;-)

Signature

Ginny Caughey
Device Application Development MVP
www.wasteworks.com
Software for Solid Waste Management

> On Jan 21, 1:48 pm, "Ginny Caughey [MVP]"
> <ginny.caughey.onl...@wasteworks.com> wrote:
[quoted text clipped - 31 lines]
>
> :L
Loogie - 21 Jan 2008 13:31 GMT
On Jan 21, 9:04 am, "Ginny Caughey [MVP]"
<ginny.caughey.onl...@wasteworks.com> wrote:
> It sounds like you don't have the desktop components for SQLce installed for
> some reason. I'd try installing SQL Compact 3.1:http://www.microsoft.com/downloads/details.aspx?FamilyID=85e0c3ce-3fa...
[quoted text clipped - 7 lines]
> Device Application Development MVPwww.wasteworks.com
> Software for Solid Waste Management

I manually added a reference by clicking 'add existing item' and
navigating to and choosing: System.Data.SqlServerCe.dll located in
\Microsoft SQL Server Compact Edition
\v3.1\System.Data.SqlServerCe.dll

This did not help. Still can not get a reference that works.

This is driving me nuts!

:L
Gee - 23 Jan 2008 20:01 GMT
I have the same problem with version 3.1. I am not using .Net but instead
using OLEDB with a Native application. If I have a column greater than one
127 nvarchar I cannot do a select on it. I can insert into it ok and can do
a select via the SQL Management tools ok. I tired installing 3.5 but have
been unable to register the sqlceoledb35.dll as the registration fails even
though it is installed and all looks correct. On another computer I did
register it but get unknown error messages when trying to connect.

Anyone got any ideas short of using .Net?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.