Showing posts with label connecting. Show all posts
Showing posts with label connecting. Show all posts

Thursday, March 8, 2012

Could not find stored procedure CMRC_ShoppingCartAddItem.

I am not sure were to start on how to fix this. I am not having any problems connecting to the mssql 2000 server. My problem is Could not find stored procedure 'CMRC_ShoppingCartAddItem'. The user has exec permissions on that procedure. This is a custom VB.net 2005 web application.. Does any one have any ideas on how to check whats wrong?

The sub that calls the procedure:
Public Sub AddItem(ByVal cartIDAs String,ByVal productIDAs String,ByVal CompanyAs String,ByVal quantityAs Integer)
' Create Instance of Connection and Command ObjectDim myConnectionAs SqlConnection =New SqlConnection("Data Source=MANDB02;Initial Catalog=db_name;UId=nobigaccess;Password=$$$$$$$")
Dim myCommandAs SqlCommand =New SqlCommand("CMRC_ShoppingCartAddItem", myConnection)
' Mark the Command as a SPROC myCommand.CommandType = CommandType.StoredProcedure' Add Parameters to SPROCDim parameterProductIDAs SqlParameter =New SqlParameter("@.ProductID", SqlDbType.NVarChar, 15)
parameterProductID.Value = productID
myCommand.Parameters.Add(parameterProductID)
Dim parameterCompanyAs SqlParameter =New SqlParameter("@.Company", SqlDbType.NVarChar, 8)
parameterCompany.Value = Company
myCommand.Parameters.Add(parameterCompany)
Dim parameterCartIDAs SqlParameter =New SqlParameter("@.CartID", SqlDbType.NVarChar, 50)
parameterCartID.Value = cartID
myCommand.Parameters.Add(parameterCartID)
Dim parameterQuantityAs SqlParameter =New SqlParameter("@.Quantity", SqlDbType.Int, 4)
parameterQuantity.Value = quantity
myCommand.Parameters.Add(parameterQuantity)
' Open the connection and execute the Command myConnection.Open() myCommand.ExecuteNonQuery() myConnection.Close()End Sub

This is what the procedure looks like in sql:

CREATE Procedure CMRC_ShoppingCartAddItem
(
@.CartIDnvarchar(50),
@.ProductIDnvarchar(23),
@.Companynvarchar(8),
@.Quantityint)As

DECLARE @.CountItemsint

SELECT @.CountItems =Count(ProductID)
FROM CMRC_ShoppingCartWHERE ProductID = @.ProductIDAND Company = @.Company
AND CartID = @.CartIDIF @.CountItems > 0/* There are items - update the current quantity */UPDATE CMRC_ShoppingCartSET Quantity = (@.Quantity + CMRC_ShoppingCart.Quantity)WHERE ProductID = @.ProductIDAND Company = @.Company
AND CartID = @.CartIDELSE/* New entry for this Cart. Add a new record */INSERT INTO CMRC_ShoppingCart
(
CartID,
Quantity,
ProductID,
Company
)
VALUES ( @.CartID, @.Quantity, @.ProductID, @.Company )GO

Try creating the proc with dbo as the owner.

CREATE Procedure dbo.CMRC_ShoppingCartAddItem

|||Changing it to dbo allowed the program to see it, just not access it. I changed the owner to the user id I am logging on with and that worked. Is that a bad idea? Should I try something else?|||

If you change the owner to the userid you login with, it may not be visible to other users. IDeally you create objects (tables/procs/views/functions etc) with dbo.<name>. You can then give the user access to the proc by giving EXEC permissions. you can also grant access as:

GRANT EXEC ON dbo.<yourproc> TO <yourUserLoginId>

Wednesday, March 7, 2012

Could not fetch a row 'VFPOLEDB'

I am running an MSDE of SQL Server 2000 with the latest server pack.
I set up a linked server connecting to a FoxPro database using the vfpoledb
provider.
On my development machine I can get this linked server to work, but on my
test machine, without a full SQL version, I get the error "Could not fetch a
row...". Does anyone have any ideas on how to fix this? I have tried
reinstalling the vfpoledb.exe but that didn't help it.
--
Evan HennisHi
I am not a VFP expert, but you may want to check that the locations for the
VFP database are correct and that MDAC versions are up-to-date and
consistent, and VFP is patched to the same level.
You may also want to see if your permissions on these machines varies.
If this is working on one machine and not the other implies the mechanism is
correct, although if the data is different it could be a factor.
The are plenty of posts concerning this error and VFP
http://tinyurl.com/94xhx and replies suggest that you check primary keys,
read http://support.microsoft.com/default.aspx?scid=kb;en-us;207595 ...
John
"EvanHennis" wrote:
> I am running an MSDE of SQL Server 2000 with the latest server pack.
> I set up a linked server connecting to a FoxPro database using the vfpoledb
> provider.
> On my development machine I can get this linked server to work, but on my
> test machine, without a full SQL version, I get the error "Could not fetch a
> row...". Does anyone have any ideas on how to fix this? I have tried
> reinstalling the vfpoledb.exe but that didn't help it.
> --
> Evan Hennis|||The actual error is:
"Could not fetch a row from OLE DB provider 'VFPOLEDB'
I am trying to connect to a local FoxPro database. Is there some security on
the local computer I need to set?
--
Evan Hennis|||Hi
Being able to connecting to the database probably rules out permissions at a
OS level. It is not clear if this is a networked database or separate ones,
if the latter check for differences in the databases. If not it is most
likely environmental e.g. MDAC.
John
"EvanHennis" wrote:
> The actual error is:
> "Could not fetch a row from OLE DB provider 'VFPOLEDB'
> I am trying to connect to a local FoxPro database. Is there some security on
> the local computer I need to set?
> --
> Evan Hennis
>|||On the test machine I am running Win2000 and I installed the MDAC 2.8. On the
development maching I am in XP Pro. Which I beleive has MDAC 2.8 built in. Is
there a way that I can compare the permissions and such on the MDAC?
--
Evan Hennis
"John Bell" wrote:
> Hi
> Being able to connecting to the database probably rules out permissions at a
> OS level. It is not clear if this is a networked database or separate ones,
> if the latter check for differences in the databases. If not it is most
> likely environmental e.g. MDAC.
> John
>
> "EvanHennis" wrote:
> > The actual error is:
> > "Could not fetch a row from OLE DB provider 'VFPOLEDB'
> >
> > I am trying to connect to a local FoxPro database. Is there some security on
> > the local computer I need to set?
> > --
> > Evan Hennis
> >
> >|||Hi
Download the the MDAC component checker
http://msdn.microsoft.com/data/mdac/downloads/default.aspx.
You have not said if this is the same database!!!
John
"EvanHennis" wrote:
> On the test machine I am running Win2000 and I installed the MDAC 2.8. On the
> development maching I am in XP Pro. Which I beleive has MDAC 2.8 built in. Is
> there a way that I can compare the permissions and such on the MDAC?
> --
> Evan Hennis
>
> "John Bell" wrote:
> > Hi
> >
> > Being able to connecting to the database probably rules out permissions at a
> > OS level. It is not clear if this is a networked database or separate ones,
> > if the latter check for differences in the databases. If not it is most
> > likely environmental e.g. MDAC.
> >
> > John
> >
> >
> > "EvanHennis" wrote:
> >
> > > The actual error is:
> > > "Could not fetch a row from OLE DB provider 'VFPOLEDB'
> > >
> > > I am trying to connect to a local FoxPro database. Is there some security on
> > > the local computer I need to set?
> > > --
> > > Evan Hennis
> > >
> > >|||Same Database? Well, each computer has its own MSDE instance on it. They are
both connecting to a FoxPro database on the development machine. BUT, I have
tried connecting to a local FoxPro database on the test machine and it
doesn't work. But if I try to connect to a local database on the development
machine it works fine.
--
Evan Hennis
"John Bell" wrote:
> Hi
> Download the the MDAC component checker
> http://msdn.microsoft.com/data/mdac/downloads/default.aspx.
> You have not said if this is the same database!!!
> John
> "EvanHennis" wrote:
> > On the test machine I am running Win2000 and I installed the MDAC 2.8. On the
> > development maching I am in XP Pro. Which I beleive has MDAC 2.8 built in. Is
> > there a way that I can compare the permissions and such on the MDAC?
> > --
> > Evan Hennis
> >
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > Being able to connecting to the database probably rules out permissions at a
> > > OS level. It is not clear if this is a networked database or separate ones,
> > > if the latter check for differences in the databases. If not it is most
> > > likely environmental e.g. MDAC.
> > >
> > > John
> > >
> > >
> > > "EvanHennis" wrote:
> > >
> > > > The actual error is:
> > > > "Could not fetch a row from OLE DB provider 'VFPOLEDB'
> > > >
> > > > I am trying to connect to a local FoxPro database. Is there some security on
> > > > the local computer I need to set?
> > > > --
> > > > Evan Hennis
> > > >
> > > >|||Hi Evan,
It may not solve your problem, but be sure you've got the latest VFP OLE DB
provider (VFP9), downloadable from
http://msdn.microsoft.com/vfoxpro/downloads/updates . It is not included
with an MDAC installation.
Are you trying to read data or update data? Updating VFP data via a linked
server was not supported in earlier versions of the OLE DB data provider.
--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy_winegarden@.msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"EvanHennis" <EvanHennis@.discussions.microsoft.com> wrote in message
news:1628DF07-BF7C-4265-8B19-00733D8CA75F@.microsoft.com...
>I am running an MSDE of SQL Server 2000 with the latest server pack.
> I set up a linked server connecting to a FoxPro database using the
> vfpoledb
> provider.
> On my development machine I can get this linked server to work, but on my
> test machine, without a full SQL version, I get the error "Could not fetch
> a
> row...". Does anyone have any ideas on how to fix this? I have tried
> reinstalling the vfpoledb.exe but that didn't help it.
> --
> Evan Hennis|||Thanks for responding but I can't use the latest VFP OLE DB because we have a
pretty large application and I can't make a change like that. I am trying to
do a normal read, Updates are not supported.
I had this working at one point so I am stumped.
--
Evan Hennis
"Cindy Winegarden" wrote:
> Hi Evan,
> It may not solve your problem, but be sure you've got the latest VFP OLE DB
> provider (VFP9), downloadable from
> http://msdn.microsoft.com/vfoxpro/downloads/updates . It is not included
> with an MDAC installation.
> Are you trying to read data or update data? Updating VFP data via a linked
> server was not supported in earlier versions of the OLE DB data provider.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy_winegarden@.msn.com www.cindywinegarden.com
> Blog: http://spaces.msn.com/members/cindywinegarden
>
> "EvanHennis" <EvanHennis@.discussions.microsoft.com> wrote in message
> news:1628DF07-BF7C-4265-8B19-00733D8CA75F@.microsoft.com...
> >I am running an MSDE of SQL Server 2000 with the latest server pack.
> > I set up a linked server connecting to a FoxPro database using the
> > vfpoledb
> > provider.
> > On my development machine I can get this linked server to work, but on my
> > test machine, without a full SQL version, I get the error "Could not fetch
> > a
> > row...". Does anyone have any ideas on how to fix this? I have tried
> > reinstalling the vfpoledb.exe but that didn't help it.
> > --
> > Evan Hennis
>
>|||I downloaded the Component Checker and I don't see the VFPOLEDB.dll in the
list of files. Could this be the issue?
--
Evan Hennis|||Hi
I think Cindy has answered this! You can check the file version numbers by
looking at the file properties. If they are different you may have to either
change the way you are doing this or regression test the parts that use the
OLEDB provider.
John
"EvanHennis" wrote:
> I downloaded the Component Checker and I don't see the VFPOLEDB.dll in the
> list of files. Could this be the issue?
> --
> Evan Hennis
>|||I don't know what you mean by saying "Cindy has answered this"? I have
installed the VFP 8 Runtime and it doesn't seem to work. So I don't think it
has anything to do with my install. Is there some place that I can check to
see if I have the VFP OLE DB installed?
--
Evan Hennis
"John Bell" wrote:
> Hi
> I think Cindy has answered this! You can check the file version numbers by
> looking at the file properties. If they are different you may have to either
> change the way you are doing this or regression test the parts that use the
> OLEDB provider.
> John
> "EvanHennis" wrote:
> > I downloaded the Component Checker and I don't see the VFPOLEDB.dll in the
> > list of files. Could this be the issue?
> > --
> > Evan Hennis
> >|||I found the issue. For some reason my installer, which is an ENTIRE different
can of worms, wasn't installing the VFP stuff correctly. I reverted back to
an older version and that fixed my issue. I am still confused that when I
tried to install the run time from a downloaded exe that it didn't work.
Anyway, thanks for all the help.
--
Evan Hennis
"EvanHennis" wrote:
> I don't know what you mean by saying "Cindy has answered this"? I have
> installed the VFP 8 Runtime and it doesn't seem to work. So I don't think it
> has anything to do with my install. Is there some place that I can check to
> see if I have the VFP OLE DB installed?
> --
> Evan Hennis
>
> "John Bell" wrote:
> > Hi
> >
> > I think Cindy has answered this! You can check the file version numbers by
> > looking at the file properties. If they are different you may have to either
> > change the way you are doing this or regression test the parts that use the
> > OLEDB provider.
> >
> > John
> >
> > "EvanHennis" wrote:
> >
> > > I downloaded the Component Checker and I don't see the VFPOLEDB.dll in the
> > > list of files. Could this be the issue?
> > > --
> > > Evan Hennis
> > >|||Hi Evan,
The VFP runtime is different from the OLE DB data provider. The runtime
supports Visual FoxPro applications (EXEs and DLLs), and also access to Fox
data from within those applications. The OLE DB data provider supports
access to Fox data from "outside." I don't know how you installed the
runtime but it doesn't necessarily install the OLE DB data provider, unless
by the "runtime" you mean a full install of the Visual FoxPro IDE, which
will, of course, install the OLE DB data provider.
--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy_winegarden@.msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"EvanHennis" <EvanHennis@.discussions.microsoft.com> wrote in message
news:BFFC8772-7669-4429-8DA3-892BA5441C02@.microsoft.com...
>I found the issue. For some reason my installer, which is an ENTIRE
>different
> can of worms, wasn't installing the VFP stuff correctly. I reverted back
> to
> an older version and that fixed my issue. I am still confused that when I
> tried to install the run time from a downloaded exe that it didn't work.|||I am not sure why I was worried about the "runtime". It was a long worthless
day so who knows. Any way, the issue was with the VFP OLE DB provider not
getting installed. I redid my installer and it works now.
Thanks,
-- Evan Hennis

Could not fetch a row 'VFPOLEDB'

I am running an MSDE of SQL Server 2000 with the latest server pack.
I set up a linked server connecting to a FoxPro database using the vfpoledb
provider.
On my development machine I can get this linked server to work, but on my
test machine, without a full SQL version, I get the error "Could not fetch a
row...". Does anyone have any ideas on how to fix this? I have tried
reinstalling the vfpoledb.exe but that didn't help it.
--
Evan HennisHi
I am not a VFP expert, but you may want to check that the locations for the
VFP database are correct and that MDAC versions are up-to-date and
consistent, and VFP is patched to the same level.
You may also want to see if your permissions on these machines varies.
If this is working on one machine and not the other implies the mechanism is
correct, although if the data is different it could be a factor.
The are plenty of posts concerning this error and VFP
http://tinyurl.com/94xhx and replies suggest that you check primary keys,
read http://support.microsoft.com/defaul...kb;en-us;207595 ...
John
"EvanHennis" wrote:

> I am running an MSDE of SQL Server 2000 with the latest server pack.
> I set up a linked server connecting to a FoxPro database using the vfpoled
b
> provider.
> On my development machine I can get this linked server to work, but on my
> test machine, without a full SQL version, I get the error "Could not fetch
a
> row...". Does anyone have any ideas on how to fix this? I have tried
> reinstalling the vfpoledb.exe but that didn't help it.
> --
> Evan Hennis|||The actual error is:
"Could not fetch a row from OLE DB provider 'VFPOLEDB'
I am trying to connect to a local FoxPro database. Is there some security on
the local computer I need to set?
--
Evan Hennis|||Hi
Being able to connecting to the database probably rules out permissions at a
OS level. It is not clear if this is a networked database or separate ones,
if the latter check for differences in the databases. If not it is most
likely environmental e.g. MDAC.
John
"EvanHennis" wrote:

> The actual error is:
> "Could not fetch a row from OLE DB provider 'VFPOLEDB'
> I am trying to connect to a local FoxPro database. Is there some security
on
> the local computer I need to set?
> --
> Evan Hennis
>|||On the test machine I am running Win2000 and I installed the MDAC 2.8. On th
e
development maching I am in XP Pro. Which I beleive has MDAC 2.8 built in. I
s
there a way that I can compare the permissions and such on the MDAC?
--
Evan Hennis
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Being able to connecting to the database probably rules out permissions at
a
> OS level. It is not clear if this is a networked database or separate ones
,
> if the latter check for differences in the databases. If not it is most
> likely environmental e.g. MDAC.
> John
>
> "EvanHennis" wrote:
>|||Hi
Download the the MDAC component checker
http://msdn.microsoft.com/data/mdac...s/default.aspx.
You have not said if this is the same database!!!
John
"EvanHennis" wrote:
[vbcol=seagreen]
> On the test machine I am running Win2000 and I installed the MDAC 2.8. On
the
> development maching I am in XP Pro. Which I beleive has MDAC 2.8 built in.
Is
> there a way that I can compare the permissions and such on the MDAC?
> --
> Evan Hennis
>
> "John Bell" wrote:
>|||Same Database? Well, each computer has its own MSDE instance on it. They are
both connecting to a FoxPro database on the development machine. BUT, I have
tried connecting to a local FoxPro database on the test machine and it
doesn't work. But if I try to connect to a local database on the development
machine it works fine.
--
Evan Hennis
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Download the the MDAC component checker
> http://msdn.microsoft.com/data/mdac...s/default.aspx.
> You have not said if this is the same database!!!
> John
> "EvanHennis" wrote:
>|||Hi Evan,
It may not solve your problem, but be sure you've got the latest VFP OLE DB
provider (VFP9), downloadable from
http://msdn.microsoft.com/vfoxpro/downloads/updates . It is not included
with an MDAC installation.
Are you trying to read data or update data? Updating VFP data via a linked
server was not supported in earlier versions of the OLE DB data provider.
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy_winegarden@.msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"EvanHennis" <EvanHennis@.discussions.microsoft.com> wrote in message
news:1628DF07-BF7C-4265-8B19-00733D8CA75F@.microsoft.com...
>I am running an MSDE of SQL Server 2000 with the latest server pack.
> I set up a linked server connecting to a FoxPro database using the
> vfpoledb
> provider.
> On my development machine I can get this linked server to work, but on my
> test machine, without a full SQL version, I get the error "Could not fetch
> a
> row...". Does anyone have any ideas on how to fix this? I have tried
> reinstalling the vfpoledb.exe but that didn't help it.
> --
> Evan Hennis|||Thanks for responding but I can't use the latest VFP OLE DB because we have
a
pretty large application and I can't make a change like that. I am trying to
do a normal read, Updates are not supported.
I had this working at one point so I am stumped.
--
Evan Hennis
"Cindy Winegarden" wrote:

> Hi Evan,
> It may not solve your problem, but be sure you've got the latest VFP OLE D
B
> provider (VFP9), downloadable from
> http://msdn.microsoft.com/vfoxpro/downloads/updates . It is not included
> with an MDAC installation.
> Are you trying to read data or update data? Updating VFP data via a linked
> server was not supported in earlier versions of the OLE DB data provider.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy_winegarden@.msn.com www.cindywinegarden.com
> Blog: http://spaces.msn.com/members/cindywinegarden
>
> "EvanHennis" <EvanHennis@.discussions.microsoft.com> wrote in message
> news:1628DF07-BF7C-4265-8B19-00733D8CA75F@.microsoft.com...
>
>|||I downloaded the Component Checker and I don't see the VFPOLEDB.dll in the
list of files. Could this be the issue?
--
Evan Hennis

Could not fetch a row 'VFPOLEDB'

I am running an MSDE of SQL Server 2000 with the latest server pack.
I set up a linked server connecting to a FoxPro database using the vfpoledb
provider.
On my development machine I can get this linked server to work, but on my
test machine, without a full SQL version, I get the error "Could not fetch a
row...". Does anyone have any ideas on how to fix this? I have tried
reinstalling the vfpoledb.exe but that didn't help it.
Evan Hennis
Hi
I am not a VFP expert, but you may want to check that the locations for the
VFP database are correct and that MDAC versions are up-to-date and
consistent, and VFP is patched to the same level.
You may also want to see if your permissions on these machines varies.
If this is working on one machine and not the other implies the mechanism is
correct, although if the data is different it could be a factor.
The are plenty of posts concerning this error and VFP
http://tinyurl.com/94xhx and replies suggest that you check primary keys,
read http://support.microsoft.com/default...b;en-us;207595 ...
John
"EvanHennis" wrote:

> I am running an MSDE of SQL Server 2000 with the latest server pack.
> I set up a linked server connecting to a FoxPro database using the vfpoledb
> provider.
> On my development machine I can get this linked server to work, but on my
> test machine, without a full SQL version, I get the error "Could not fetch a
> row...". Does anyone have any ideas on how to fix this? I have tried
> reinstalling the vfpoledb.exe but that didn't help it.
> --
> Evan Hennis
|||The actual error is:
"Could not fetch a row from OLE DB provider 'VFPOLEDB'
I am trying to connect to a local FoxPro database. Is there some security on
the local computer I need to set?
Evan Hennis
|||Hi
Being able to connecting to the database probably rules out permissions at a
OS level. It is not clear if this is a networked database or separate ones,
if the latter check for differences in the databases. If not it is most
likely environmental e.g. MDAC.
John
"EvanHennis" wrote:

> The actual error is:
> "Could not fetch a row from OLE DB provider 'VFPOLEDB'
> I am trying to connect to a local FoxPro database. Is there some security on
> the local computer I need to set?
> --
> Evan Hennis
>
|||On the test machine I am running Win2000 and I installed the MDAC 2.8. On the
development maching I am in XP Pro. Which I beleive has MDAC 2.8 built in. Is
there a way that I can compare the permissions and such on the MDAC?
Evan Hennis
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Being able to connecting to the database probably rules out permissions at a
> OS level. It is not clear if this is a networked database or separate ones,
> if the latter check for differences in the databases. If not it is most
> likely environmental e.g. MDAC.
> John
>
> "EvanHennis" wrote:
|||Hi
Download the the MDAC component checker
http://msdn.microsoft.com/data/mdac/.../default.aspx.
You have not said if this is the same database!!!
John
"EvanHennis" wrote:
[vbcol=seagreen]
> On the test machine I am running Win2000 and I installed the MDAC 2.8. On the
> development maching I am in XP Pro. Which I beleive has MDAC 2.8 built in. Is
> there a way that I can compare the permissions and such on the MDAC?
> --
> Evan Hennis
>
> "John Bell" wrote:
|||Same Database? Well, each computer has its own MSDE instance on it. They are
both connecting to a FoxPro database on the development machine. BUT, I have
tried connecting to a local FoxPro database on the test machine and it
doesn't work. But if I try to connect to a local database on the development
machine it works fine.
Evan Hennis
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Download the the MDAC component checker
> http://msdn.microsoft.com/data/mdac/.../default.aspx.
> You have not said if this is the same database!!!
> John
> "EvanHennis" wrote:
|||Hi Evan,
It may not solve your problem, but be sure you've got the latest VFP OLE DB
provider (VFP9), downloadable from
http://msdn.microsoft.com/vfoxpro/downloads/updates . It is not included
with an MDAC installation.
Are you trying to read data or update data? Updating VFP data via a linked
server was not supported in earlier versions of the OLE DB data provider.
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy_winegarden@.msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"EvanHennis" <EvanHennis@.discussions.microsoft.com> wrote in message
news:1628DF07-BF7C-4265-8B19-00733D8CA75F@.microsoft.com...
>I am running an MSDE of SQL Server 2000 with the latest server pack.
> I set up a linked server connecting to a FoxPro database using the
> vfpoledb
> provider.
> On my development machine I can get this linked server to work, but on my
> test machine, without a full SQL version, I get the error "Could not fetch
> a
> row...". Does anyone have any ideas on how to fix this? I have tried
> reinstalling the vfpoledb.exe but that didn't help it.
> --
> Evan Hennis
|||Thanks for responding but I can't use the latest VFP OLE DB because we have a
pretty large application and I can't make a change like that. I am trying to
do a normal read, Updates are not supported.
I had this working at one point so I am stumped.
Evan Hennis
"Cindy Winegarden" wrote:

> Hi Evan,
> It may not solve your problem, but be sure you've got the latest VFP OLE DB
> provider (VFP9), downloadable from
> http://msdn.microsoft.com/vfoxpro/downloads/updates . It is not included
> with an MDAC installation.
> Are you trying to read data or update data? Updating VFP data via a linked
> server was not supported in earlier versions of the OLE DB data provider.
> --
> Cindy Winegarden MCSD, Microsoft Most Valuable Professional
> cindy_winegarden@.msn.com www.cindywinegarden.com
> Blog: http://spaces.msn.com/members/cindywinegarden
>
> "EvanHennis" <EvanHennis@.discussions.microsoft.com> wrote in message
> news:1628DF07-BF7C-4265-8B19-00733D8CA75F@.microsoft.com...
>
>
|||I downloaded the Component Checker and I don't see the VFPOLEDB.dll in the
list of files. Could this be the issue?
Evan Hennis

Saturday, February 25, 2012

Could not establish connection to database

I am having a great deal of difficulty connecting my version of visual web developer 2005 express to the AspNetSqlProvider as stated in the tutorials online at the web developer center. I keep getting the error below.

"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "

When I run the utility I still get a connection error using the hostname of my computer and windows authentication.

The setup failed message is as below also:-

"Setup failed.

Exception:
Unable to connect to SQL Server database.

-
Details of failure
-

System.Web.HttpException: Unable to connect to SQL Server database. > System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
End of inner exception stack trace
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()"

I have tried some of the suggestions on the forum with no result

Please can you help

Do you in fact have a SQL Server installed?

If you installed SQL Server Express, the 'computer name' to use is probably [ .\SQLEXPRESS ]

Have you tried [ (local) ]

If you have NOT installed SQL Server, you can download (and then install) a free copy of SQL Server 2005 Express here.

|||

Thanks for the reply.

I do have SQL Server Express installed since I can open the configuration tool

|||

Arnie,

Thanks for the info again. I tried it using the aspnet_regsql tool and got a successfult database creation so that worked fine. The only problem now is that the Web Admin tool within Visual web Developer it is saying that the server path is

[Hostname]\John Brindle rather than [Hostname]\SQLEXPRESS which is what it needs to be I guess. Do you know how I change this so I can get a good connection test using the tool and thus be able to use the database with Visual Web Developer?

Regards

John

|||

I am facing the same problem but I have not installed SQL Server 2005 Express Edition

I have SQL Server 2005 Enterprise edition.

I have tried using the aspnet_regsql utility that creates the aspnetdb but I am unable to see its instance in tha app_dev folder

and I am unable to connect to it ...

Any suggestions ?

|||Sorry have no suggestions. My problem seems tro be more basic than even getting the database created which I can now do by specifiying [Hostname of my pc]\SQLEXPRESS as the server path. MY problem is I cannot do a test connection to the database and thuis use it.|||

I have the same problem, I'm using Windows Vista Home Premium, I can establish a connection from the Database Explorer but when using the ASP.NET configuration I get the message:

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

I have ran the aspnet_regsql and changed the host to <pcname>\sqlexpress but get the same exact error. Weird because I don't have that problem with my XP machine at work. Any suggestions?

thanks

|||

Ok, I found the solution for not beeing able to use SQL on the webdeveloper. The issue is that SQL Server (express or full version) does not allow user instances to be run by default, when trying to use the security option in webdeveloper a database file (.mdf) is created and a new user instances outside the server is created.

Ok, enough explanation, the solution: open sql management studio and open the master database, make a new query and type sp_configure 'user instances enabled','1' execute this , then type reconfigure and execute this too so the changes take effect. For more information on sp_configure you can read http://msdn2.microsoft.com/en-us/library/ms188787.aspx if you wish to list all the configuration then execute sp_configure without any parameters.

Hope it helps and good luck.

|||

AngelX, my last hope before I call Microsoft.

I'm running Vista and SQL 2005 Developer.

I don't have ' user instances enabled' to set?

Regards

Phil

|||

Phillip,

Open the Microsoft SQL Server Manager Studio (in my case I have the Manager Studio Express version), connect to you database and make a new query with your current connection, then execute the following sp_configure, in the query result tab a list like the following should appear:

Name

Minimum

Maximum

Config_value

Run_value

allow updates

0

1

0

0

clr enabled

0

1

0

0

cross db ownership chaining

0

1

0

0

default language

0

9999

0

0

max text repl size (B)

0

2147483647

65536

65536

nested triggers

0

1

1

1

remote access

0

1

1

1

remote admin connections

0

1

0

0

remote login timeout (s)

0

2147483647

20

20

remote proc trans

0

1

0

0

remote query timeout (s)

0

2147483647

600

600

server trigger recursion

0

1

1

1

show advanced options

0

1

0

0

user instances enabled

0

1

1

1

user options

0

32767

0

0

If you see the list then you're in business, type sp_configure "user instances enabled", 1 and execute this, then execute reconfigure so the changes take effect.

Hope it helps.

Could not establish connection to database

I am having a great deal of difficulty connecting my version of visual web developer 2005 express to the AspNetSqlProvider as stated in the tutorials online at the web developer center. I keep getting the error below.

"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "

When I run the utility I still get a connection error using the hostname of my computer and windows authentication.

The setup failed message is as below also:-

"Setup failed.

Exception:
Unable to connect to SQL Server database.

-
Details of failure
-

System.Web.HttpException: Unable to connect to SQL Server database. > System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
End of inner exception stack trace
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()"

I have tried some of the suggestions on the forum with no result

Please can you help

Do you in fact have a SQL Server installed?

If you installed SQL Server Express, the 'computer name' to use is probably [ .\SQLEXPRESS ]

Have you tried [ (local) ]

If you have NOT installed SQL Server, you can download (and then install) a free copy of SQL Server 2005 Express here.

|||

Thanks for the reply.

I do have SQL Server Express installed since I can open the configuration tool

|||

Arnie,

Thanks for the info again. I tried it using the aspnet_regsql tool and got a successfult database creation so that worked fine. The only problem now is that the Web Admin tool within Visual web Developer it is saying that the server path is

[Hostname]\John Brindle rather than [Hostname]\SQLEXPRESS which is what it needs to be I guess. Do you know how I change this so I can get a good connection test using the tool and thus be able to use the database with Visual Web Developer?

Regards

John

|||

I am facing the same problem but I have not installed SQL Server 2005 Express Edition

I have SQL Server 2005 Enterprise edition.

I have tried using the aspnet_regsql utility that creates the aspnetdb but I am unable to see its instance in tha app_dev folder

and I am unable to connect to it ...

Any suggestions ?

|||Sorry have no suggestions. My problem seems tro be more basic than even getting the database created which I can now do by specifiying [Hostname of my pc]\SQLEXPRESS as the server path. MY problem is I cannot do a test connection to the database and thuis use it.|||

I have the same problem, I'm using Windows Vista Home Premium, I can establish a connection from the Database Explorer but when using the ASP.NET configuration I get the message:

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

I have ran the aspnet_regsql and changed the host to <pcname>\sqlexpress but get the same exact error. Weird because I don't have that problem with my XP machine at work. Any suggestions?

thanks

|||

Ok, I found the solution for not beeing able to use SQL on the webdeveloper. The issue is that SQL Server (express or full version) does not allow user instances to be run by default, when trying to use the security option in webdeveloper a database file (.mdf) is created and a new user instances outside the server is created.

Ok, enough explanation, the solution: open sql management studio and open the master database, make a new query and type sp_configure 'user instances enabled','1' execute this , then type reconfigure and execute this too so the changes take effect. For more information on sp_configure you can read http://msdn2.microsoft.com/en-us/library/ms188787.aspx if you wish to list all the configuration then execute sp_configure without any parameters.

Hope it helps and good luck.

|||

AngelX, my last hope before I call Microsoft.

I'm running Vista and SQL 2005 Developer.

I don't have ' user instances enabled' to set?

Regards

Phil

|||

Phillip,

Open the Microsoft SQL Server Manager Studio (in my case I have the Manager Studio Express version), connect to you database and make a new query with your current connection, then execute the following sp_configure, in the query result tab a list like the following should appear:

Name

Minimum

Maximum

Config_value

Run_value

allow updates

0

1

0

0

clr enabled

0

1

0

0

cross db ownership chaining

0

1

0

0

default language

0

9999

0

0

max text repl size (B)

0

2147483647

65536

65536

nested triggers

0

1

1

1

remote access

0

1

1

1

remote admin connections

0

1

0

0

remote login timeout (s)

0

2147483647

20

20

remote proc trans

0

1

0

0

remote query timeout (s)

0

2147483647

600

600

server trigger recursion

0

1

1

1

show advanced options

0

1

0

0

user instances enabled

0

1

1

1

user options

0

32767

0

0

If you see the list then you're in business, type sp_configure "user instances enabled", 1 and execute this, then execute reconfigure so the changes take effect.

Hope it helps.

Could not establish connection to database

I am having a great deal of difficulty connecting my version of visual web developer 2005 express to the AspNetSqlProvider as stated in the tutorials online at the web developer center. I keep getting the error below.

"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "

When I run the utility I still get a connection error using the hostname of my computer and windows authentication.

The setup failed message is as below also:-

"Setup failed.

Exception:
Unable to connect to SQL Server database.

-
Details of failure
-

System.Web.HttpException: Unable to connect to SQL Server database. > System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
End of inner exception stack trace
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()"

I have tried some of the suggestions on the forum with no result

Please can you help

Do you in fact have a SQL Server installed?

If you installed SQL Server Express, the 'computer name' to use is probably [ .\SQLEXPRESS ]

Have you tried [ (local) ]

If you have NOT installed SQL Server, you can download (and then install) a free copy of SQL Server 2005 Express here.

|||

Thanks for the reply.

I do have SQL Server Express installed since I can open the configuration tool

|||

Arnie,

Thanks for the info again. I tried it using the aspnet_regsql tool and got a successfult database creation so that worked fine. The only problem now is that the Web Admin tool within Visual web Developer it is saying that the server path is

[Hostname]\John Brindle rather than [Hostname]\SQLEXPRESS which is what it needs to be I guess. Do you know how I change this so I can get a good connection test using the tool and thus be able to use the database with Visual Web Developer?

Regards

John

|||

I am facing the same problem but I have not installed SQL Server 2005 Express Edition

I have SQL Server 2005 Enterprise edition.

I have tried using the aspnet_regsql utility that creates the aspnetdb but I am unable to see its instance in tha app_dev folder

and I am unable to connect to it ...

Any suggestions ?

|||Sorry have no suggestions. My problem seems tro be more basic than even getting the database created which I can now do by specifiying [Hostname of my pc]\SQLEXPRESS as the server path. MY problem is I cannot do a test connection to the database and thuis use it.|||

I have the same problem, I'm using Windows Vista Home Premium, I can establish a connection from the Database Explorer but when using the ASP.NET configuration I get the message:

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

I have ran the aspnet_regsql and changed the host to <pcname>\sqlexpress but get the same exact error. Weird because I don't have that problem with my XP machine at work. Any suggestions?

thanks

|||

Ok, I found the solution for not beeing able to use SQL on the webdeveloper. The issue is that SQL Server (express or full version) does not allow user instances to be run by default, when trying to use the security option in webdeveloper a database file (.mdf) is created and a new user instances outside the server is created.

Ok, enough explanation, the solution: open sql management studio and open the master database, make a new query and type sp_configure 'user instances enabled','1' execute this , then type reconfigure and execute this too so the changes take effect. For more information on sp_configure you can read http://msdn2.microsoft.com/en-us/library/ms188787.aspx if you wish to list all the configuration then execute sp_configure without any parameters.

Hope it helps and good luck.

|||

AngelX, my last hope before I call Microsoft.

I'm running Vista and SQL 2005 Developer.

I don't have ' user instances enabled' to set?

Regards

Phil

|||

Phillip,

Open the Microsoft SQL Server Manager Studio (in my case I have the Manager Studio Express version), connect to you database and make a new query with your current connection, then execute the following sp_configure, in the query result tab a list like the following should appear:

Name

Minimum

Maximum

Config_value

Run_value

allow updates

0

1

0

0

clr enabled

0

1

0

0

cross db ownership chaining

0

1

0

0

default language

0

9999

0

0

max text repl size (B)

0

2147483647

65536

65536

nested triggers

0

1

1

1

remote access

0

1

1

1

remote admin connections

0

1

0

0

remote login timeout (s)

0

2147483647

20

20

remote proc trans

0

1

0

0

remote query timeout (s)

0

2147483647

600

600

server trigger recursion

0

1

1

1

show advanced options

0

1

0

0

user instances enabled

0

1

1

1

user options

0

32767

0

0

If you see the list then you're in business, type sp_configure "user instances enabled", 1 and execute this, then execute reconfigure so the changes take effect.

Hope it helps.