2012年3月25日星期日

Disk or network error

Hi

I have written an application in VB through which I can convert DBASE
IV database to MS SQL Server database. Also, the application provides
database manipulation features to the user like addition, deletion etc
of records.
I am using OPENROWSET for conversion purposes. Also the server is MS
SQL Server 2000.
Now this application workks fine when I have installed the instance of
MS SQL Server on my local machine. It converts the database and stores
it on the server perfectly and there are no isues.
However, when I try to use the application to connect with MS SQL
Server on another machine, there are a few problems. I connect to the
other MS SQL Server on other machine through named pipes. My
application successfully accesses the database and allows user to
modify it according to his needs.
For this I created the user account of that user on the machine.
But when I try to convert the database, I get the following error
message:

[Microsoft ODBC Dbase driver]Disk or Network Error

Here is the line in VB code which is causing all the trouble:

con.Execute "select * into " & UCase(X) & " from
OPENROWSET('MSDASQL','Driver={Microsoft dBASE Driver
(*.dbf)};DEFAULTDIR=" & BaseData & ";SourceType=DBF','select * from " &
UCase(X) & "')"

Here, X is the dbf file name, BaseData is the path name of file.
I gave the user full rights but i am still getting this error message.
Now, what am I doing wrong here?

Regards,
ShwetabhHi

You don't say of you can open the DBASE file from DBASE on the remote
machine? Are you using a mapped drive or UNC name? Have you checked that the
permissions are correct for the SQL Server service account?

John
"Shwetabh" <shwetabhgoel@.gmail.com> wrote in message
news:1144529567.672831.5960@.v46g2000cwv.googlegrou ps.com...
> Hi
> I have written an application in VB through which I can convert DBASE
> IV database to MS SQL Server database. Also, the application provides
> database manipulation features to the user like addition, deletion etc
> of records.
> I am using OPENROWSET for conversion purposes. Also the server is MS
> SQL Server 2000.
> Now this application workks fine when I have installed the instance of
> MS SQL Server on my local machine. It converts the database and stores
> it on the server perfectly and there are no isues.
> However, when I try to use the application to connect with MS SQL
> Server on another machine, there are a few problems. I connect to the
> other MS SQL Server on other machine through named pipes. My
> application successfully accesses the database and allows user to
> modify it according to his needs.
> For this I created the user account of that user on the machine.
> But when I try to convert the database, I get the following error
> message:
> [Microsoft ODBC Dbase driver]Disk or Network Error
> Here is the line in VB code which is causing all the trouble:
> con.Execute "select * into " & UCase(X) & " from
> OPENROWSET('MSDASQL','Driver={Microsoft dBASE Driver
> (*.dbf)};DEFAULTDIR=" & BaseData & ";SourceType=DBF','select * from " &
> UCase(X) & "')"
> Here, X is the dbf file name, BaseData is the path name of file.
> I gave the user full rights but i am still getting this error message.
> Now, what am I doing wrong here?
> Regards,
> Shwetabh|||Hi,

Actually, the DBASE files are stored in a seperate folder on the remote
machine (remote in the sense that though it is in the intranet, SQL
server 2000 isnt installed on it). I have made the drive shared. Also,
in my effort to get it to work, I gave the user all rights on the SQL
server. But it still doesnt work.
And yes, I am using UNC name.

Regards,
Shwetabh|||Hi Shwetabh

If you service account is a domain account then log onto the SQL Server
machine as this account and see if you can access the DBASE files.

John

Shwetabh wrote:
> Hi,
> Actually, the DBASE files are stored in a seperate folder on the remote
> machine (remote in the sense that though it is in the intranet, SQL
> server 2000 isnt installed on it). I have made the drive shared. Also,
> in my effort to get it to work, I gave the user all rights on the SQL
> server. But it still doesnt work.
> And yes, I am using UNC name.
> Regards,
> Shwetabh|||Hi,
Sorry for taking so long to reply.
Actually, I can access the database from my application.
But I am unable to import my DBASE database to sql server.
when I try to do so, using OPENROWSET I get the error message.
Also, since the end product will be used by many other people,
their individual accounts will be created, I dont think using domain
account will be a good idea.

Regards,
Shwetabh|||Hi

To access network resources you will need a domain account with the
appropriate privileges otherwise you will not be able to connect.

John
"Shwetabh" <shwetabhgoel@.gmail.com> wrote in message
news:1145602062.263512.306870@.e56g2000cwe.googlegr oups.com...
> Hi,
> Sorry for taking so long to reply.
> Actually, I can access the database from my application.
> But I am unable to import my DBASE database to sql server.
> when I try to do so, using OPENROWSET I get the error message.
> Also, since the end product will be used by many other people,
> their individual accounts will be created, I dont think using domain
> account will be a good idea.
> Regards,
> Shwetabh|||Hi,

Lets consider this,
I have the DBASE files on the local machine.
Now I want to convert them and store them in MS SQL
Server.
Now for doing this, I use OPENROWSET.
I can access the already converted database (which I converted
manually on the server for testing purpose). I can read, write, delete
that data. I get no errors when I do that.
Now when I try to convert database from DBF (stored on local disk)
to SQL using OPENROWSET, I get the error: Disk or Network Error.

How should I resolve this?

Shwetabh|||Shwetabh (shwetabhgoel@.gmail.com) writes:
> Sorry for taking so long to reply.
> Actually, I can access the database from my application.
> But I am unable to import my DBASE database to sql server.
> when I try to do so, using OPENROWSET I get the error message.
> Also, since the end product will be used by many other people,
> their individual accounts will be created, I dont think using domain
> account will be a good idea.

When John talked about domain account, he referred to the account
under which SQL Server itself is running. To access resources on
the network, the account should be a domain account. Running SQL
Server under a domain account is a very common thing to do, even
in multi-user enviroments.

To review the service accont for SQL Server, right-click My Computer
on the server, select Manage. Find Services, and in the list of
services, find MSSQL Server. Double-click, and go the log on tab.
Make sure that the user there has access to the remote drive
where the DBASE files are located.

Or move the DBASE files to a local disk on the server.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Hi,

I tried to access the database stored on a machine running Windows 2000
+ MS SQL Server 2000 and it worked fine.
Infact, it worked fine when used by any machine which would connect to
Windows 2000 server.
I was easily able to import the data on servers running Windows 2k.
But I am getting this error by connecting onto the servers running
Windows 2003.

Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC dBase Driver] The
Microsoft Jet database engine could not find the object 'ACE'. Make
sure the object exists and that you spell its name and the path name
correctly.]

How can I resolve this problem?

Regards,
Shwetabh|||Hi,

I tried to access the database stored on a machine running Windows 2000
+ MS SQL Server 2000 and it worked fine.
Infact, it worked fine when used by any machine which would connect to
Windows 2000 server.
I was easily able to import the data on servers running Windows 2k.
But I am getting this error by connecting onto the servers running
Windows 2003.

Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC dBase Driver] The
Microsoft Jet database engine could not find the object 'ACE'. Make
sure the object exists and that you spell its name and the path name
correctly.]

Windows 2003 server is also running MS SQL Server 2000. But I cant get
it to work.
How can I resolve this problem?

Regards,
Shwetabh|||Shwetabh (shwetabhgoel@.gmail.com) writes:
> I tried to access the database stored on a machine running Windows 2000
> + MS SQL Server 2000 and it worked fine.
> Infact, it worked fine when used by any machine which would connect to
> Windows 2000 server.
> I was easily able to import the data on servers running Windows 2k.
> But I am getting this error by connecting onto the servers running
> Windows 2003.
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'MSDASQL' reported an error.
> [OLE/DB provider returned message: [Microsoft][ODBC dBase Driver] The
> Microsoft Jet database engine could not find the object 'ACE'. Make
> sure the object exists and that you spell its name and the path name
> correctly.]
> How can I resolve this problem?

Not that I am sure that I can help anyway, but it would definitely help if
you can give full details, both when it is working and when it is not.

1) Where is the dBase file located in relation to the SQL Server? Local
disk or an a network share?

2) Under what account is SQL Server running?

3) Do you get the error when you run under any account on SQL Server,
even as administrator?

In the end this may have more to do with Windows or Active Directory that
I know very little about.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

没有评论:

发表评论