开发者

Error - Could not locate entry in sysdatabases for database

开发者 https://www.devze.com 2023-01-18 21:06 出处:网络
keep getting this error on this code: whenI Connect to test Database with vb.netits show connection successfully Established.

keep getting this error on this code:

when I Connect to test Database with vb.net its show connection successfully Established.

But when i want to Generate particular report with vb.net applocation its gives me following Error.

Could not locate entry in sysdat开发者_运维百科abases for database 'test'. No entry found with that name. Make sure that the name is entered correctly.


Have you had a look at who the owner is of the Test database and the owner of the objects you are trying to query?

It sounds like something might be getting confused in that area.


I faced the same issue.

We need to use Square brackets for database name

ie

use [database]

instead of

use database

Hope it helps.


Please check the default server name for your DB id which you are using in db connection. I faced same problem when i saw at db server config for my id then found default db was not correct and that db was dropped recently from system id is trying to search first default db and then the db you want to connect. If default db not found then it gives error.

0

精彩评论

暂无评论...
验证码 换一张
取 消