-
March 30th, 2006, 11:31 AM
#1
upgrade VB6 to VB.Net w/Access
I've upgraded a small utility program. It connects to an access database. This database has field names with spaces. This worked fine in VB6 using [] as in myDB![with spaces] but .Net barks at it and the error is Identifier Expected.
I've tried double quotes...curly brackets...no brackets...nothing worked that I thought of.
Any help would be appreciated...
thanks!
-
March 31st, 2006, 01:34 AM
#2
Re: upgrade VB6 to VB.Net w/Access
I'm just going to add a few comments.
- using spaces in FieldNames aren't really advised (IMO) - I would much rather recommend using the LNC naming convention
- Using spaces in names, get confusing, especially when Inserting new records etc.
-
March 31st, 2006, 10:15 AM
#3
Re: upgrade VB6 to VB.Net w/Access
Originally Posted by cmazsmith
I've upgraded a small utility program. It connects to an access database. This database has field names with spaces. This worked fine in VB6 using [] as in myDB![with spaces] but .Net barks at it and the error is Identifier Expected.
I've tried double quotes...curly brackets...no brackets...nothing worked that I thought of.
Any help would be appreciated...
thanks!
The easiest and least painful solution is to rename your fields and put underscores where there are now spaces.
I just tested this on an Access database and you will not lose any data.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|