473,320 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 2010
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: defined in discarded section...
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 this limitation? Thanks in advance Jeff
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 Led Zeppelin I Dazed and Confused Led Zeppelin...
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? Used to, you could select (Overrides) for your...
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 shown, Does anyone know how to turn this on...
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: <section name=".." type=".." file="..."> but it...
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 Books Online pages for own reference. Thanks in...
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 same. I used the VBA code at the below link...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.