William Vaughn
4/22/2008 1:48:00 AM
The SQL Server Compact .SDF database is small, fast and light, requires no
"install" (there are 6 or so DLLs that can be attached to the project) and
can be passed around just like a JET database. It's also free. See my EBook
at www.hitchhikerguides.net.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker???s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"NYWGUY54" <NYWGUY54@discussions.microsoft.com> wrote in message
news:E967B937-0913-478D-B552-C6BC4D2F6714@microsoft.com...
> Thanks everyone,
> I finally figured out what i had wrong. My code (sample) does work when I
> add this before it :
> Dim cb_voters As OleDbCommandBuilder = New OleDbCommandBuilder(daVoters)
> This will build a default update command. I instantiate all my
> dataadapters
> in code (not as objects) & forgot to assign an updatecommand. The odd
> thing
> is when I wrote another piece of code to test this the debugger threw an
> error that told me I needed an update command, my primary code didn't
> through
> the error, just processed it and moved on & that is what confounded me.
> William, as far as the DB goes, you are correct I don't want to use Jet
> either, but this has to be both low cost & very portable. But if you know
> of
> another DB that i can simple copy from machine to machine (with no
> install)
> that would perform better than Jet (Access), I'll gladly take your advice.
> Thanks
> Gary
>
> "Cor Ligthert[MVP]" wrote:
>
>> Hi,
>>
>> Sorry for my misread,
>>
>> Did you investigate your connection string or maybe your SQL transact
>> code,
>> be aware that SQL for OleDB is not always the same as for SQL server.
>>
>> Cor
>>
>> "NYWGUY54" <NYWGUY54@discussions.microsoft.com> schreef in bericht
>> news:92E3B536-5A3C-4CEE-9605-AF25BCF8485F@microsoft.com...
>> >I am trying to save changes to a dataset using the dataAdapters update
>> >method
>> > to an Access 2003 DB, therefore I'm using an OleDbDataAdapter to
>> > accomplish
>> > this.
>> > I am using a For/Next loop to change a single column of data in the
>> > dataTable, & I know this works. The problem arises when I try to write
>> > the
>> > changes to the Access DB, nothing happens but the code process
>> > properly. I
>> > use virtually the same code set in another project writing to a SQL
>> > server
>> > DB
>> > & that works just fine. Is there some issue with OLEDB & Jet that this
>> > does
>> > not work or that i must do something different?
>> > Just for laughs I included a code snipit of what i'm doing.
>> >
>> > Try
>> > Conn.Open()
>> > daVoters.Update(dsCommittee, "Voters")
>> > Conn.Close()
>> > dsCommittee.AcceptChanges()
>> > Catch ex As OleDb.OleDbException
>> > Conn.Close()
>> > MessageBox.Show("There was an error updating the Database" &
>> > vbCr & vbLf & ex.Message, "Prep Data", MessageBoxButtons.OK,
>> > MessageBoxIcon.Error)
>> >
>> > End Try
>> >
>> > BTW I can do this by writing each change to the DB as I change it in
>> > the
>> > datatable, but this requires me to open & close the connection nearly
>> > 1/2
>> > million times (there are over400,000 records in the DB)
>> >
>> > Thanks
>> > Gary
>> >
>> >
>>