TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
w.seye
NA
1
0
Add Column to Access database using OleDB
Dec 26 2003 7:44 AM
Hi guys, I've been searching for this for 4 hours, but it just doens't seem to work. I have an access database, and i have to add a column to it. Here's my code: string connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data Source=D:\My Documents\Visual Studio 2003.NET\VerboServe\Verboserve.mdb;" + "User ID=Admin;" + "Password="; OleDbConnection conn = new OleDbConnection(connString); DataSet ds = new DataSet(); conn.Open(); OleDbDataAdapter dataAdapter = new OleDbDataAdapter("SELECT * FROM Verbs", conn); OleDbCommandBuilder commandBuilder = new OleDbCommandBuilder(dataAdapter); dataAdapter.Fill(ds, "Verbs"); ds.Tables["Verbs"].Columns.Add("Wouter"); foreach (DataRow thisRow in ds.Tables["Verbs"].Rows) { thisRow["Wouter"] = "True"; } commandBuilder.QuotePrefix = "["; commandBuilder.QuoteSuffix = "]"; ds.AcceptChanges(); dataAdapter.Update(ds, "Verbs"); Can anyone tell me how to do this? Thanks, Wouter
Reply
Answers (
2
)
how i can do that
Looking for clarification on | operator