@ 好好 zhang 先生 The
host computer can open the database but cannot read the data . The host computer can
connect to the database normally because the code conn.Open();
can be executed normally.
However, when C # executes the query function, an error is reported and the object name "UserInfos" is invalid.
In SQL, use the query statement , Can also correctly find the corresponding data.
Select GradeId, GradeName from GradeInfo
This problem is driving people crazy, the final solution is as follows:
First, log in as sa administrator, right-click user property changes: the
original database is master
change The default database is the database you use.
Similarly, log in to your own account and make the same changes.
Finally, reconnect to the database and you are done.
At this point, the host computer can correctly read the contents of the database.
Hope to help you friends! !