Home All Groups Group Topic Archive Search About

Data Source error... help!?

Author
22 Jul 2006 4:05 PM
ebrastow
Hi folks,

I'm a VB newbie - been using PowerBuilder for 12 years and thought I'd
see how Visual Basic has come along these days.

I'm using MS Visual Studio 2005 Professional, trying to connect to a
SQL Server 2000 Standard (SP4) database on another machine.

For weeks, whenever I've had time to try this, I have gone through the
"Add New Data Source..." wizard, filled in all of the information
appropriately, and at the end, when it should be showing me my tables
and it's at the last screen of the wizard where it says, "Which
database objects do you want in your dataset?", it's showing me the
following error:

--

An error occurred while retrieving the information from the database.

Failed to retrieve data for this request.
An exception occurred while executing a Transact-SQL statement or
batch.
Line 8: Incorrect syntax near "1".

--

This happens consistently. Here is the connection string it's
generating (I've changed the names to protect the guilty):

"Data Source=SERVERNAME;Initial Catalog=databasename;Persist Security
Info=True;User ID=username;Password=userpassword"

I have verified that everything is typed correctly.

Now, what's weird is that as I was playing around with this this
morning, I came across something interesting. It turns out that in the
"Server Explorer" pane, where it lists Database Connections, I can
expand this very same connection and it shows me the tables, views,
SP's, etc... in my database. It's the very same connection, and it
works in the server pane but not in the Data Sources pane.

What the heck!??  :)

Any help would be very much appreciated. I'd like to be sure my
database connections are on solid footing before I go trying to learn
VB in earnest.

Evan

Author
30 Jul 2006 3:36 AM
ebrastow
Hi guys,

Since there's been no replies on this, and I can find nothing on this
online at all, I'm wondering if I could ask a more basic question, as
I'm still having this issue and can't even begin to use VB until I can
get this fixed :)

Question: Is there *anything* I should be doing *before* I start the
"New Data Source..." wizard to try to connect to the database? I've
installed the SQL Server 2000 connectivity files from the SQL Server
2000 CD, etc... I can connect to my SQL Server from Enterprise Manager.
I just can't connect at all from the New Data Source wizard.

Any ideas? (see below for details)

Thanks :)

Evan

ebrastow wrote:
Show quoteHide quote
> Hi folks,
>
> I'm a VB newbie - been using PowerBuilder for 12 years and thought I'd
> see how Visual Basic has come along these days.
>
> I'm using MS Visual Studio 2005 Professional, trying to connect to a
> SQL Server 2000 Standard (SP4) database on another machine.
>
> For weeks, whenever I've had time to try this, I have gone through the
> "Add New Data Source..." wizard, filled in all of the information
> appropriately, and at the end, when it should be showing me my tables
> and it's at the last screen of the wizard where it says, "Which
> database objects do you want in your dataset?", it's showing me the
> following error:
>
> --
>
> An error occurred while retrieving the information from the database.
>
> Failed to retrieve data for this request.
> An exception occurred while executing a Transact-SQL statement or
> batch.
> Line 8: Incorrect syntax near "1".
>
> --
>
> This happens consistently. Here is the connection string it's
> generating (I've changed the names to protect the guilty):
>
> "Data Source=SERVERNAME;Initial Catalog=databasename;Persist Security
> Info=True;User ID=username;Password=userpassword"
>
> I have verified that everything is typed correctly.
>
> Now, what's weird is that as I was playing around with this this
> morning, I came across something interesting. It turns out that in the
> "Server Explorer" pane, where it lists Database Connections, I can
> expand this very same connection and it shows me the tables, views,
> SP's, etc... in my database. It's the very same connection, and it
> works in the server pane but not in the Data Sources pane.
>
> What the heck!??  :)
>
> Any help would be very much appreciated. I'd like to be sure my
> database connections are on solid footing before I go trying to learn
> VB in earnest.
>
> Evan
Author
31 Jul 2006 12:28 PM
Brian Tkatch
ebrastow wrote:
Show quoteHide quote
> Hi guys,
>
> Since there's been no replies on this, and I can find nothing on this
> online at all, I'm wondering if I could ask a more basic question, as
> I'm still having this issue and can't even begin to use VB until I can
> get this fixed :)
>
> Question: Is there *anything* I should be doing *before* I start the
> "New Data Source..." wizard to try to connect to the database? I've
> installed the SQL Server 2000 connectivity files from the SQL Server
> 2000 CD, etc... I can connect to my SQL Server from Enterprise Manager.
> I just can't connect at all from the New Data Source wizard.
>
> Any ideas? (see below for details)
>
> Thanks :)
>
> Evan
>
> ebrastow wrote:
> > Hi folks,
> >
> > I'm a VB newbie - been using PowerBuilder for 12 years and thought I'd
> > see how Visual Basic has come along these days.
> >
> > I'm using MS Visual Studio 2005 Professional, trying to connect to a
> > SQL Server 2000 Standard (SP4) database on another machine.
> >
> > For weeks, whenever I've had time to try this, I have gone through the
> > "Add New Data Source..." wizard, filled in all of the information
> > appropriately, and at the end, when it should be showing me my tables
> > and it's at the last screen of the wizard where it says, "Which
> > database objects do you want in your dataset?", it's showing me the
> > following error:
> >
> > --
> >
> > An error occurred while retrieving the information from the database.
> >
> > Failed to retrieve data for this request.
> > An exception occurred while executing a Transact-SQL statement or
> > batch.
> > Line 8: Incorrect syntax near "1".
> >
> > --
> >
> > This happens consistently. Here is the connection string it's
> > generating (I've changed the names to protect the guilty):
> >
> > "Data Source=SERVERNAME;Initial Catalog=databasename;Persist Security
> > Info=True;User ID=username;Password=userpassword"
> >
> > I have verified that everything is typed correctly.
> >
> > Now, what's weird is that as I was playing around with this this
> > morning, I came across something interesting. It turns out that in the
> > "Server Explorer" pane, where it lists Database Connections, I can
> > expand this very same connection and it shows me the tables, views,
> > SP's, etc... in my database. It's the very same connection, and it
> > works in the server pane but not in the Data Sources pane.
> >
> > What the heck!??  :)
> >
> > Any help would be very much appreciated. I'd like to be sure my
> > database connections are on solid footing before I go trying to learn
> > VB in earnest.
> >
> > Evan

This is an odd error. Have you tried the MS forums?

..NET Framework Data Access and Storage
<URL:http://forums.microsoft.com/msdn/showforum.aspx?forumid=45&siteid=1>

B.
Author
4 Aug 2006 2:46 AM
ebrastow
Thanks Brian... I done that yet, but will do so tonight.

Thanks!

Evan



Brian Tkatch wrote:
Show quoteHide quote
> ebrastow wrote:
> > Hi guys,
> >
> > Since there's been no replies on this, and I can find nothing on this
> > online at all, I'm wondering if I could ask a more basic question, as
> > I'm still having this issue and can't even begin to use VB until I can
> > get this fixed :)
> >
> > Question: Is there *anything* I should be doing *before* I start the
> > "New Data Source..." wizard to try to connect to the database? I've
> > installed the SQL Server 2000 connectivity files from the SQL Server
> > 2000 CD, etc... I can connect to my SQL Server from Enterprise Manager.
> > I just can't connect at all from the New Data Source wizard.
> >
> > Any ideas? (see below for details)
> >
> > Thanks :)
> >
> > Evan
> >
> > ebrastow wrote:
> > > Hi folks,
> > >
> > > I'm a VB newbie - been using PowerBuilder for 12 years and thought I'd
> > > see how Visual Basic has come along these days.
> > >
> > > I'm using MS Visual Studio 2005 Professional, trying to connect to a
> > > SQL Server 2000 Standard (SP4) database on another machine.
> > >
> > > For weeks, whenever I've had time to try this, I have gone through the
> > > "Add New Data Source..." wizard, filled in all of the information
> > > appropriately, and at the end, when it should be showing me my tables
> > > and it's at the last screen of the wizard where it says, "Which
> > > database objects do you want in your dataset?", it's showing me the
> > > following error:
> > >
> > > --
> > >
> > > An error occurred while retrieving the information from the database.
> > >
> > > Failed to retrieve data for this request.
> > > An exception occurred while executing a Transact-SQL statement or
> > > batch.
> > > Line 8: Incorrect syntax near "1".
> > >
> > > --
> > >
> > > This happens consistently. Here is the connection string it's
> > > generating (I've changed the names to protect the guilty):
> > >
> > > "Data Source=SERVERNAME;Initial Catalog=databasename;Persist Security
> > > Info=True;User ID=username;Password=userpassword"
> > >
> > > I have verified that everything is typed correctly.
> > >
> > > Now, what's weird is that as I was playing around with this this
> > > morning, I came across something interesting. It turns out that in the
> > > "Server Explorer" pane, where it lists Database Connections, I can
> > > expand this very same connection and it shows me the tables, views,
> > > SP's, etc... in my database. It's the very same connection, and it
> > > works in the server pane but not in the Data Sources pane.
> > >
> > > What the heck!??  :)
> > >
> > > Any help would be very much appreciated. I'd like to be sure my
> > > database connections are on solid footing before I go trying to learn
> > > VB in earnest.
> > >
> > > Evan
>
> This is an odd error. Have you tried the MS forums?
>
> .NET Framework Data Access and Storage
> <URL:http://forums.microsoft.com/msdn/showforum.aspx?forumid=45&siteid=1>
>
> B.