Trying to implement this for an Access.mdb file. It worked on development
machine but failed on two user machines.


Dim alter As OleDb.OleDbCommand
daConn.Open()
alter = New OleDb.OleDbCommand("ALTER TABLE BillableTimesheet ADD COLUMN
Submitted BIT", daConn)
Try
alter.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
daConn.Close()

Re: Alter Table Add Column by Miha

Miha
Wed Aug 18 14:51:52 CDT 2004

Hi Nathan,

What kind of application is this?
Is the Access version the same on all machines?
Does your application have enough privileges on database?
What does error say?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Nathan Carroll" <thelosthorizon@Bhutan.com> wrote in message
news:OGq0osVhEHA.3664@TK2MSFTNGP11.phx.gbl...
> Trying to implement this for an Access.mdb file. It worked on development
> machine but failed on two user machines.
>
>
> Dim alter As OleDb.OleDbCommand
> daConn.Open()
> alter = New OleDb.OleDbCommand("ALTER TABLE BillableTimesheet ADD COLUMN
> Submitted BIT", daConn)
> Try
> alter.ExecuteNonQuery()
> Catch ex As Exception
> MessageBox.Show(ex.Message)
> End Try
> daConn.Close()
>
>



Re: Alter Table Add Column by Nathan

Nathan
Wed Aug 18 15:07:40 CDT 2004

VB.net app.
The file is Access 2000 on all machines.
Not sure
Error says: Application has generated an exception that could not be
handled.
and it give thread and process id


"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:ur$3OzVhEHA.4064@TK2MSFTNGP12.phx.gbl...
> Hi Nathan,
>
> What kind of application is this?
> Is the Access version the same on all machines?
> Does your application have enough privileges on database?
> What does error say?
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> miha at rthand com
> www.rthand.com
>
> "Nathan Carroll" <thelosthorizon@Bhutan.com> wrote in message
> news:OGq0osVhEHA.3664@TK2MSFTNGP11.phx.gbl...
> > Trying to implement this for an Access.mdb file. It worked on
development
> > machine but failed on two user machines.
> >
> >
> > Dim alter As OleDb.OleDbCommand
> > daConn.Open()
> > alter = New OleDb.OleDbCommand("ALTER TABLE BillableTimesheet ADD COLUMN
> > Submitted BIT", daConn)
> > Try
> > alter.ExecuteNonQuery()
> > Catch ex As Exception
> > MessageBox.Show(ex.Message)
> > End Try
> > daConn.Close()
> >
> >
>
>



Re: Alter Table Add Column by Miha

Miha
Wed Aug 18 15:16:42 CDT 2004

Check the InnerException property.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Nathan Carroll" <thelosthorizon@Bhutan.com> wrote in message
news:edwII8VhEHA.2916@TK2MSFTNGP12.phx.gbl...
> VB.net app.
> The file is Access 2000 on all machines.
> Not sure
> Error says: Application has generated an exception that could not be
> handled.
> and it give thread and process id
>
>
> "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> news:ur$3OzVhEHA.4064@TK2MSFTNGP12.phx.gbl...
>> Hi Nathan,
>>
>> What kind of application is this?
>> Is the Access version the same on all machines?
>> Does your application have enough privileges on database?
>> What does error say?
>>
>> --
>> Miha Markic [MVP C#] - RightHand .NET consulting & development
>> miha at rthand com
>> www.rthand.com
>>
>> "Nathan Carroll" <thelosthorizon@Bhutan.com> wrote in message
>> news:OGq0osVhEHA.3664@TK2MSFTNGP11.phx.gbl...
>> > Trying to implement this for an Access.mdb file. It worked on
> development
>> > machine but failed on two user machines.
>> >
>> >
>> > Dim alter As OleDb.OleDbCommand
>> > daConn.Open()
>> > alter = New OleDb.OleDbCommand("ALTER TABLE BillableTimesheet ADD
>> > COLUMN
>> > Submitted BIT", daConn)
>> > Try
>> > alter.ExecuteNonQuery()
>> > Catch ex As Exception
>> > MessageBox.Show(ex.Message)
>> > End Try
>> > daConn.Close()
>> >
>> >
>>
>>
>
>



Re: Alter Table Add Column by Nathan

Nathan
Wed Aug 18 17:00:55 CDT 2004

InnerException gives the same inablility to handle error response.

"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:#vnFkHWhEHA.3148@TK2MSFTNGP10.phx.gbl...
> Check the InnerException property.
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> miha at rthand com
> www.rthand.com
>
> "Nathan Carroll" <thelosthorizon@Bhutan.com> wrote in message
> news:edwII8VhEHA.2916@TK2MSFTNGP12.phx.gbl...
> > VB.net app.
> > The file is Access 2000 on all machines.
> > Not sure
> > Error says: Application has generated an exception that could not be
> > handled.
> > and it give thread and process id
> >
> >
> > "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> > news:ur$3OzVhEHA.4064@TK2MSFTNGP12.phx.gbl...
> >> Hi Nathan,
> >>
> >> What kind of application is this?
> >> Is the Access version the same on all machines?
> >> Does your application have enough privileges on database?
> >> What does error say?
> >>
> >> --
> >> Miha Markic [MVP C#] - RightHand .NET consulting & development
> >> miha at rthand com
> >> www.rthand.com
> >>
> >> "Nathan Carroll" <thelosthorizon@Bhutan.com> wrote in message
> >> news:OGq0osVhEHA.3664@TK2MSFTNGP11.phx.gbl...
> >> > Trying to implement this for an Access.mdb file. It worked on
> > development
> >> > machine but failed on two user machines.
> >> >
> >> >
> >> > Dim alter As OleDb.OleDbCommand
> >> > daConn.Open()
> >> > alter = New OleDb.OleDbCommand("ALTER TABLE BillableTimesheet ADD
> >> > COLUMN
> >> > Submitted BIT", daConn)
> >> > Try
> >> > alter.ExecuteNonQuery()
> >> > Catch ex As Exception
> >> > MessageBox.Show(ex.Message)
> >> > End Try
> >> > daConn.Close()
> >> >
> >> >
> >>
> >>
> >
> >
>
>



Re: Alter Table Add Column by Paul

Paul
Fri Aug 20 07:53:35 CDT 2004

On Wed, 18 Aug 2004 14:39:57 -0500, "Nathan Carroll" <thelosthorizon@Bhutan.com> wrote:

¤ Trying to implement this for an Access.mdb file. It worked on development
¤ machine but failed on two user machines.
¤
¤
¤ Dim alter As OleDb.OleDbCommand
¤ daConn.Open()
¤ alter = New OleDb.OleDbCommand("ALTER TABLE BillableTimesheet ADD COLUMN
¤ Submitted BIT", daConn)
¤ Try
¤ alter.ExecuteNonQuery()
¤ Catch ex As Exception
¤ MessageBox.Show(ex.Message)
¤ End Try
¤ daConn.Close()
¤

Have you tried using the Access DDL keyword YESNO instead of BIT?

Does the code fail if you attempt to add a different data type (such as TEXT)?


Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)