Unspecified error when filling dataset?

M

Michael Reinhart

Hi everyone:

What am I doing wrong?--- I'm going bonkers with this one... on the
CustDA.Fill(custDS) line, I get an "Unspecified Error"...


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim Conn As OleDbConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\Inetpub\iissamples\sdk\asp\database\Authors.mdb")

Dim selectCMD As OleDbCommand = New OleDbCommand("SELECT * FROM
Authors", Conn)
selectCMD.CommandTimeout = 30

Dim custDA As OleDbDataAdapter = New OleDbDataAdapter
custDA.SelectCommand = selectCMD

Dim custDS As DataSet = New DataSet
custDA.Fill(custDS)
DataGrid1.DataSource = custDS
DataGrid1.DataBind()

End Sub


Thanks !

Mykl
 
M

Miha Markic [MVP C#]

Hi Michael,

Are you sure that asp.net account or network_service (if running on w2k3)
have enough NTFS privileges to read/write the database file?
 
M

Michael Reinhart

Yes. For testing purposes, I've made ASPNET a member of the Administrators
group

m

Miha Markic said:
Hi Michael,

Are you sure that asp.net account or network_service (if running on w2k3)
have enough NTFS privileges to read/write the database file?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Michael Reinhart said:
Hi everyone:

What am I doing wrong?--- I'm going bonkers with this one... on the
CustDA.Fill(custDS) line, I get an "Unspecified Error"...


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim Conn As OleDbConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\Inetpub\iissamples\sdk\asp\database\Authors.mdb")

Dim selectCMD As OleDbCommand = New OleDbCommand("SELECT * FROM
Authors", Conn)
selectCMD.CommandTimeout = 30

Dim custDA As OleDbDataAdapter = New OleDbDataAdapter
custDA.SelectCommand = selectCMD

Dim custDS As DataSet = New DataSet
custDA.Fill(custDS)
DataGrid1.DataSource = custDS
DataGrid1.DataBind()

End Sub


Thanks !

Mykl
 
M

Miha Markic [MVP C#]

What OS are you running?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Michael Reinhart said:
Yes. For testing purposes, I've made ASPNET a member of the
Administrators group

m

Miha Markic said:
Hi Michael,

Are you sure that asp.net account or network_service (if running on w2k3)
have enough NTFS privileges to read/write the database file?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Michael Reinhart said:
Hi everyone:

What am I doing wrong?--- I'm going bonkers with this one... on the
CustDA.Fill(custDS) line, I get an "Unspecified Error"...


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim Conn As OleDbConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\Inetpub\iissamples\sdk\asp\database\Authors.mdb")

Dim selectCMD As OleDbCommand = New OleDbCommand("SELECT * FROM
Authors", Conn)
selectCMD.CommandTimeout = 30

Dim custDA As OleDbDataAdapter = New OleDbDataAdapter
custDA.SelectCommand = selectCMD

Dim custDS As DataSet = New DataSet
custDA.Fill(custDS)
DataGrid1.DataSource = custDS
DataGrid1.DataBind()

End Sub


Thanks !

Mykl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top