472,342 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 software developers and data experts.

Error creating database connection with field name "Section"

I've run across a strange error when creating a simple ADO.Net
connection in VB.Net 2003

To replicate an error:
Create an Access database (2002) with table named "Student" and fields
SID (Autofill), FirstName and LastName.

Put some dummy data in table.

Start a new VB.Net application, create a new connection to your
database, drag fields on to form, complete wizard steps...no problem!

Close VB.Net, go back to Access, add field called "Section" (text
field), add some dummy data (i.e., A, B, C, etc)

Create a new VB.Net project, follow steps above, come up with the
following error:

The wizard detected the following problems when configuring the data
adapter
"OleDbDataAdapter1".

Details:
Generated SELECT statement.

IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

For some reason, it seems that ADO.Net (or at least the wizard)
doesn't like a field named Section.

Any ideas on this?

Thanks,
Dave

Nov 20 '05 #1
3 1929
Sounds like section is a reserved word in access, and the .net wizard can't
deal with it properly.

Yet another reason to avoid using the wizard and code by hand.

"Dave" <nl**@nospam.home.com> wrote in message
news:40**************@news.east.cox.net...
I've run across a strange error when creating a simple ADO.Net
connection in VB.Net 2003

To replicate an error:
Create an Access database (2002) with table named "Student" and fields
SID (Autofill), FirstName and LastName.

Put some dummy data in table.

Start a new VB.Net application, create a new connection to your
database, drag fields on to form, complete wizard steps...no problem!

Close VB.Net, go back to Access, add field called "Section" (text
field), add some dummy data (i.e., A, B, C, etc)

Create a new VB.Net project, follow steps above, come up with the
following error:

The wizard detected the following problems when configuring the data
adapter
"OleDbDataAdapter1".

Details:
Generated SELECT statement.

IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

For some reason, it seems that ADO.Net (or at least the wizard)
doesn't like a field named Section.

Any ideas on this?

Thanks,
Dave

Nov 20 '05 #2
On Thu, 15 Jan 2004 16:24:40 GMT, nl**@nospam.home.com (Dave) wrote:

¤ I've run across a strange error when creating a simple ADO.Net
¤ connection in VB.Net 2003
¤
¤ To replicate an error:
¤ Create an Access database (2002) with table named "Student" and fields
¤ SID (Autofill), FirstName and LastName.
¤
¤ Put some dummy data in table.
¤
¤ Start a new VB.Net application, create a new connection to your
¤ database, drag fields on to form, complete wizard steps...no problem!
¤
¤ Close VB.Net, go back to Access, add field called "Section" (text
¤ field), add some dummy data (i.e., A, B, C, etc)
¤
¤ Create a new VB.Net project, follow steps above, come up with the
¤ following error:
¤
¤ The wizard detected the following problems when configuring the data
¤ adapter
¤ "OleDbDataAdapter1".
¤
¤ Details:
¤ Generated SELECT statement.
¤
¤ IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
¤
¤ For some reason, it seems that ADO.Net (or at least the wizard)
¤ doesn't like a field named Section.
¤
¤ Any ideas on this?

Yes, either enclose within brackets e.g. [Section] or don't use Access or ODBC reserved words:

ACC2002: Reserved Words in Microsoft Access
http://support.microsoft.com/default...b;en-us;286335

ACC2002: Microsoft Jet 4.0 Reserved Words
http://support.microsoft.com/default...b;en-us;321266

http://msdn.microsoft.com/library/de...dappcpr_17.asp
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 20 '05 #3
Thanks Paul!

So simple a problem...so hard to find...aren't they all that way!

Dave

On Thu, 15 Jan 2004 12:31:09 -0600, Paul Clement
<Us***********************@swspectrum.com> wrote:
On Thu, 15 Jan 2004 16:24:40 GMT, nl**@nospam.home.com (Dave) wrote:

¤ I've run across a strange error when creating a simple ADO.Net
¤ connection in VB.Net 2003
¤
¤ To replicate an error:
¤ Create an Access database (2002) with table named "Student" and fields
¤ SID (Autofill), FirstName and LastName.
¤
¤ Put some dummy data in table.
¤
¤ Start a new VB.Net application, create a new connection to your
¤ database, drag fields on to form, complete wizard steps...no problem!
¤
¤ Close VB.Net, go back to Access, add field called "Section" (text
¤ field), add some dummy data (i.e., A, B, C, etc)
¤
¤ Create a new VB.Net project, follow steps above, come up with the
¤ following error:
¤
¤ The wizard detected the following problems when configuring the data
¤ adapter
¤ "OleDbDataAdapter1".
¤
¤ Details:
¤ Generated SELECT statement.
¤
¤ IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
¤
¤ For some reason, it seems that ADO.Net (or at least the wizard)
¤ doesn't like a field named Section.
¤
¤ Any ideas on this?

Yes, either enclose within brackets e.g. [Section] or don't use Access or ODBC reserved words:

ACC2002: Reserved Words in Microsoft Access
http://support.microsoft.com/default...b;en-us;286335

ACC2002: Microsoft Jet 4.0 Reserved Words
http://support.microsoft.com/default...b;en-us;321266

http://msdn.microsoft.com/library/de...dappcpr_17.asp
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hartmut Sbosny | last post by:
Hello, I get the linker message `.gnu.linkonce.t._ZN3TNT12CurveTntPlotIdE6handleEi' referenced in section `.rodata' of FollowCurveWindow.o:...
3
by: Jeff | last post by:
I have 3 pages of data I need printed for each record, however, Access won't allow me to create a 3 page detail section. Is there any way around...
2
by: Mike Lerch | last post by:
I have data like this: Album Song Led Zeppelin I Good Times Bad Times Led Zeppelin I Babe I'm Gonna Leave You Led Zeppelin I You Shook Me...
4
by: Jason Kendall | last post by:
Why is it that there doesn't appear to be an easy way to select what overridable method you want to override from the IDE as you could in VS2003? ...
1
by: | last post by:
Is there a setting/configuration that will open a new cs file WITHOUT "<summary> ... </summary>" and "// ... //TODO: .. //"? Thanks. Haji
1
by: QLD_AU | last post by:
I am having trouble when viewing the code behind a form, any events i do are shown, however the Windows Form Designer generated code Section is not...
1
by: A.M-SG | last post by:
Hi, I am trying to simplify my app.config file. Can I have a section handler in a separated file? I am looking for something like this: ...
2
by: pedestrian via SQLMonster.com | last post by:
I wonder is there any way I can turn off the "Documentation Feedback" section of the Books Online at the bottom of the pages... I'm printing some...
1
by: WiscCard | last post by:
I have an Access report that I need to print the 1st page on letterhead and the 2nd page on blank paper, then move on to the next record and do the...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.