List Info

Thread: Need VB 2005 snippet of code for inserting row into MS Access 2003




Need VB 2005 snippet of code for inserting row into MS Access 2003
country flaguser name
United States
2008-05-22 12:31:37

I am using VB2005 and Access 2003.

I need a snippet of code for Visual Studio 2005 for a console
application to insert a record into Access 2003.

I want to insert data from a flat file to an existing MS Access table.

Can someone supply the code to do this. I can read from the flat file
without a problem, but need the code to insert into MS Access. I
already have a data connection that is in the Database explorer that
points to the correct table in access. It is defined as:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source = c:test.MDB

The table name in Access is called NewTable and the field is called
FieldA.

I don't want to display any response to the user, so I want this to be
a console application.

Thank you for your help.

- larryTAKEOUT%40seldin.net">larryTAKEOUTseldin.net

__._,_.___
.

__,_._,___
Re: Need VB 2005 snippet of code for inserting row into MS Access 2003
country flaguser name
United States
2008-05-22 14:19:31


SQL = "INSERT NewTable SET FieldA = '" & newvalue &
"'"
connectionobject.Execute(SQL)

cj

--- lseldin < larry%40seldin.net">larryseldin.net> wrote:

> I am using VB2005 and Access 2003.
&gt;
> I need a snippet of code for Visual Studio 2005 for
> a console
> application to insert a record into Access 2003.
&gt;
> I want to insert data from a flat file to an
> existing MS Access table.
&gt;
> Can someone supply the code to do this. I can read
>; from the flat file
>; without a problem, but need the code to insert into
>; MS Access. I
> already have a data connection that is in the
> Database explorer that
>; points to the correct table in access. It is defined
> as:
>
> Provider=Microsoft.Jet.OLEDB.4.0;Data Source =
> c:test.MDB
>
> The table name in Access is called NewTable and the
> field is called
&gt; FieldA.
>
> I don't want to display any response to the user, so
> I want this to be
> a console application.
>
> Thank you for your help.
&gt;
> - larryTAKEOUT%40seldin.net">larryTAKEOUTseldin.net
>
>

__._,_.___
.

__,_._,___
Connecting VB.NET to SharePoint
country flaguser name
United States
2008-05-22 20:52:01

Hey Troops.long time member.first time poster.(geez.I been listenin' to
Mancow too much!).

Anyways, I have been trying like crazy to get my VB.NET program to access a
SharePoint site that's made up of a bunch a project folders.

The program works like a charm on the departmental Intranet, and of course
on my machine's hard drive.but when it comes to SharePoint.I GOT NUTTIN'!!!

I'm working in VB 2005.I've got the Microsoft.SharePoint.dll referenced in
my project.the on-the-fly debugger is reading my SharePoint methods,
offering and correcting as I type.so it seems to be working from that
standpoint.

But just as soon as I hit the button that executes the SharePoint
code.KA-POW!!! SPL-ATTT!! I got nuttin' honey!! Nuttin' except a great big
fat alert box tellin' me how things need to be given permission or
something.

If anyone could give me a hand, some pointers, suggestions.anything.man, I'm
all ears.

Thanks everyone for your thoughts and suggestions!

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
Re: Need VB 2005 snippet of code for inserting row into MS Access 2003
country flaguser name
United States
2008-05-23 08:18:49

hi all,
please i need help. i have about 10 forms in my project and wants them to be displayed in random order as i click the next button. pls how do i achieve this. if possibble give me the codes to use.
im using VB6.0
thanks

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )