all groups > dotnet general > november 2003 >
You're in the

dotnet general

group:

I'm getting crazy overhere....$#$#%$


Re: I'm getting crazy overhere....$#$#%$ Sahil Malik
11/14/2003 2:55:18 PM
dotnet general:
Eric,

There is no shortcut to success.

ADO.NET is what you need to populate your database. ADO.NET lets you write
your code - simple and bad - should you need it,
or well laid out and verbose - should you choose to do it.

I recommend a book on ADO.NET by David Sceppa.

If you want a "quickfix", do this.

You have your excel loaded in a dataset (I presume you were able to do this
much).
(Using Oledb)
Now create a datacommand.
Put relevant commandtext in it.
Obviously the right d/b connection as a connection object
do command.executenonquery.

THATS IT DUDE !!! NOW CHILL :)

- SM



[quoted text, click to view]

Re: I'm getting crazy overhere....$#$#%$ Matt Burland
11/14/2003 2:58:34 PM
You should (but I haven't actually tried it) be able to create a table in an
access database (assuming you already have a database file) by creating a
connection to your database using the OleDbConnection object, then you can
create an OleDbCommand and set it to use your connection and set the command
text to something like:

"CREATE TABLE mytable ( myfield1 varchar, myfield2 int.....)"

and then use the OleDbCommand.ExecuteNonQuery method to run the actual
method. That you create your table with the columns you've specified and
then you can go from there. I'm not 100% sure this is actually supported by
the Access drivers, so good luck.

I agree with you on the NorthWind database though!


[quoted text, click to view]

I'm getting crazy overhere....$#$#%$ EMW
11/14/2003 8:13:55 PM
The MSDN is a great source of information for programmers of .NET
applications, but not for the simple things!!!!

I have been searching for a few days now, my desk is filled with printouts
from books, help pages and web pages, but still cannot find what I'm looking
for.

I'm trying to write a little program, to practice VB.NET, to convert a table
from EXCEL to an ACCESS DATABASE.
I managed to find some examples on how to create a database using ADOX and I
managed to fill a datagrid with the contents of the EXCEL file.

Now I'm trying to find out how to move the info from the datagrid to de
database in a simple and jet fast way.

All the books, web pages and help pages I've been reading all contain
samples on how to open the NorthWind database (which I now really hate), but
nowhere is there a sample that shows how to create a new table, write
something in it and close the database.
And they also always talk about SQL servers which I don't have.

So you now get my frustration.

Can someone please help me, before my insanity becomes permanent?

rg.
Eric

Re: I'm getting crazy overhere....$#$#%$ EMW
11/14/2003 9:41:07 PM
Thanks!

I'm now chilling..... ;)


"Sahil Malik" <nospam@ms.com> schreef in bericht
news:ecr27kuqDHA.1096@TK2MSFTNGP11.phx.gbl...
[quoted text, click to view]

Re: I'm getting crazy overhere....$#$#%$ EMW
11/14/2003 10:01:45 PM
YES!!! I got it working.... I guess it helps putting onces frustration on a
newsserver... ;)


"EMW" <someone@microsoft.com> schreef in bericht
news:3fb52960$0$79332$5fc3050@dreader2.news.tiscali.nl...
[quoted text, click to view]

Re: I'm getting crazy overhere....$#$#%$ Cor
11/14/2003 10:25:43 PM
Hi EMW,

Of course that did work, because you did not get any message which said:
"don't do it", so you was looking again taking the advices or did it by
yourself, but you did know it could be solved ".

:-)

Cor

Re: I'm getting crazy overhere....$#$#%$ EMW
11/14/2003 10:44:55 PM
Actually I hit a page in the MSDN showing me how to use the code...

Eric.


"Cor" <non@non.com> schreef in bericht
news:u6PI4XvqDHA.488@tk2msftngp13.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button