Click here to Skip to main content
15,913,487 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Suppressing first-chance exception messages Pin
Luc Pattyn19-Nov-07 9:56
sitebuilderLuc Pattyn19-Nov-07 9:56 
GeneralRe: Suppressing first-chance exception messages Pin
supercat919-Nov-07 9:59
supercat919-Nov-07 9:59 
GeneralRe: Suppressing first-chance exception messages Pin
Luc Pattyn19-Nov-07 10:52
sitebuilderLuc Pattyn19-Nov-07 10:52 
GeneralRe: Suppressing first-chance exception messages Pin
supercat919-Nov-07 13:23
supercat919-Nov-07 13:23 
GeneralRe: Suppressing first-chance exception messages Pin
Luc Pattyn19-Nov-07 13:51
sitebuilderLuc Pattyn19-Nov-07 13:51 
GeneralRe: Suppressing first-chance exception messages Pin
Dave Kreskowiak19-Nov-07 9:58
mveDave Kreskowiak19-Nov-07 9:58 
GeneralRe: Suppressing first-chance exception messages Pin
supercat919-Nov-07 10:39
supercat919-Nov-07 10:39 
QuestionInsert Records into Access DB Pin
culbysl19-Nov-07 8:49
culbysl19-Nov-07 8:49 
I am working on a project that pulls SQL Server data and places it into a MS Access database. The dataset contains 3438 rows, and 0 rows are inserted into Access. There are no errors when the code run, just nothing happens. The code is listed below:

Public Function InsertAccessData(ByVal dsTDO_Header as dataset) As String
Dim cn As New OleDbConnection(strACCDBConn)
Dim strSQL As String = ""

Dim DA As New OleDbDataAdapter

strSQL = "Select * from TDO_HEADER"

DA.SelectCommand = New OleDbCommand(strSQL, cn)
DA.FillSchema(dsTDO_Header, SchemaType.Source, "TDO_Header")

Dim oleCB As New OleDbCommandBuilder(DA)
Try

cn.Open()

oleCB.GetInsertCommand()
DA.Update(dsTDO_Header, "TDO_Header")

''dsTDO_Header contains 3438 records,
''DA.Update inserts 0 Records in db with no errors
''that is the problem

cn.Close()
cn.Dispose()
DA.Dispose()

Catch ex As Exception
Dim strErrMess As String

strErrMess = "Something didn't work right we received this update error: " & ex.Message

cn.Close()
cn.Dispose()
DA.Dispose()

Return strErrMess

Exit Function

End Try

Return "Success"

End Function

Can anyone see where I went astray?

Thanks in advance for any help.

culbysl
AnswerRe: Insert Records into Access DB Pin
Dave Kreskowiak19-Nov-07 10:05
mveDave Kreskowiak19-Nov-07 10:05 
GeneralRe: Insert Records into Access DB Pin
culbysl19-Nov-07 10:11
culbysl19-Nov-07 10:11 
AnswerRe: Insert Records into Access DB Pin
deathbat20-Nov-07 13:16
deathbat20-Nov-07 13:16 
Questiontyped vs untyped datasets Pin
imonfiredammit19-Nov-07 7:40
imonfiredammit19-Nov-07 7:40 
AnswerRe: typed vs untyped datasets Pin
Vasudevan Deepak Kumar19-Nov-07 18:34
Vasudevan Deepak Kumar19-Nov-07 18:34 
QuestionStoping a cursor with a collusion code Pin
mykingdomforanewusername19-Nov-07 7:01
mykingdomforanewusername19-Nov-07 7:01 
AnswerRe: Stoping a cursor with a collusion code Pin
Luc Pattyn19-Nov-07 10:04
sitebuilderLuc Pattyn19-Nov-07 10:04 
Questiondrawing a polynomial function using graphics panel Pin
billybobthro19-Nov-07 5:52
billybobthro19-Nov-07 5:52 
AnswerRe: drawing a polynomial function using graphics panel Pin
Luc Pattyn19-Nov-07 10:07
sitebuilderLuc Pattyn19-Nov-07 10:07 
GeneralRe: drawing a polynomial function using graphics panel Pin
billybobthro19-Nov-07 10:31
billybobthro19-Nov-07 10:31 
GeneralRe: drawing a polynomial function using graphics panel Pin
Luc Pattyn19-Nov-07 11:32
sitebuilderLuc Pattyn19-Nov-07 11:32 
QuestionGraphics Question Pin
Quecumber25619-Nov-07 3:45
Quecumber25619-Nov-07 3:45 
AnswerRe: Graphics Question Pin
pmarfleet19-Nov-07 9:11
pmarfleet19-Nov-07 9:11 
AnswerRe: Graphics Question Pin
Dave Kreskowiak19-Nov-07 10:07
mveDave Kreskowiak19-Nov-07 10:07 
GeneralRe: Graphics Question Pin
Quecumber25619-Nov-07 10:51
Quecumber25619-Nov-07 10:51 
QuestionComponent to generate pdf or tiff from templates Pin
Nitin198119-Nov-07 1:27
Nitin198119-Nov-07 1:27 
AnswerRe: Component to generate pdf or tiff from templates Pin
DigiOz Multimedia19-Nov-07 8:52
DigiOz Multimedia19-Nov-07 8:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.