problems changing column name in ms access

  • Thread starter Thread starter dennist
  • Start date Start date
D

dennist

I have a table named topics. One of the columns is named
Text. ado.net doesn't like that, so designates it as
_Text. This may or may not be the source of a certain
problem I'm having.

I thought an easy way to find out would be to rename the
column TopicText.

First I deleted ds.xsd an ds.vb. Then I closed the
solution. I was fully prepared to create in code a new
strongly typed dataset, including the xsd.exe in the
console window.

However, when I tried, I got an error in this statement:

da.FillSchema(ds, SchemaType.Source, "Topics")

I even tried putting the fillschema and writeschema
statements somewhere else, to no avail. When I changed
the column back to Text, I got other errors.

So my question is, how can one change a table column name
and create a new strongly typed dataset in code. Or do I
have to write a compleley new project? This is RAD? The
great advance over vb6 and ADO. The disconnected dataset
was a great idea, but Microsoft changed VB into a geek's
tool, no longer a RAD solution for people far more
interested in solving a problem than in programming the
solution.

dennist
 
Hello Dennist,

Thanks for posting in the group.

I noticed that you have posted a similar question on FillSchema in this
group. I have replied with detailed infomation there. For how to create a
strongly typed dataset, I think you may refer to:

1) Create it programmatically
Please refer to MSDN KB article:
"HOW TO: Populate a DataSet Object from a Database by Using Visual C# .NET"
http://support.microsoft.com/?id=314145
It has code samples on how to do it. Please rename the column name in
database and I think you could recreate it in the program.

2) Create it through command line tool xsd.exe
The basic idea is to create a CS file first and then compile it to a class
library.
The detailed steps are described at:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpcongeneratingstrongly
typeddataset.asp?frame=true

Does that answer your question? If the problem still can't be resolved,
please feel free to post here.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thank you Huang(if I have that right)
I will look into both of these and see what the results
are. I'll let you know.

dennist
 
this morning the 18the in israel I got a notice that
there's been a new posting for me in this thread.
However, I don't see it, and will check back later. I've
noticed lately that postings that are made through
developer's ex often don't make it here, and some that
are made directly here don't appear.

dennist
 
Hi Dennist,

Generally speaking, when we post a reply or we find a MVP or community
member provides answer, we will send a post notify email to the you if you
registered a valid email address.

I think the problem is caused by email delay. For me, I often check post in
www.google.com also. We could input issue title in google.com and then
click search button. The result is in groups tab.

If there is anything unclear, please feel free to post here. Thanks very
much for your feedback.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top