Help With MS SQL Error: The value's length for key 'data source' exceeds it's limit of '128'.
- From: Loogie <boogieloogie@xxxxxxxxx>
- Date: Mon, 21 Jan 2008 04:12:29 -0800 (PST)
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
.
- Follow-Ups:
- Prev by Date: Re: Unable to connect to Sql Server Compact Edition Database
- Next by Date: Re: Help With MS SQL Error: The value's length for key 'data source' exceeds it's limit of '128'.
- Previous by thread: General Network Error
- Next by thread: Re: Help With MS SQL Error: The value's length for key 'data source' exceeds it's limit of '128'.
- Index(es):
Relevant Pages
|
Loading