Okay I fixed that error and now I get another one. I put a command builder 
right after the dataadapter


'Create a DataAdapter ------------------------------------

Dim objDataAdapter As OleDbDataAdapter

objDataAdapter = New OleDbDataAdapter(strSQLstring, objConn)

'Build Update Command - Causes error - Syntax error in INSERT INTO 
statement.

Dim objCommandBuilder As New OleDbCommandBuilder(objDataAdapter)




I get this error now.

Server Error in '/btcNET' Application.
--------------------------------------------------------------------------------

Syntax error in INSERT INTO statement.
Description: An unhandled exception occurred during the execution of the 
current web request. Please review the stack trace for more information 
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Syntax error in INSERT 
INTO statement.

Source Error:

      An unhandled exception was generated during the execution of the 
current web request. Information regarding the origin and location of the 
exception can be identified using the exception stack trace below.

Stack Trace:

[OleDbException (0x80040e14): Syntax error in INSERT INTO statement.]
   System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs 
rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +277
   System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs 
rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +48
   System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, 
DataTableMapping tableMapping) +1802
   System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, 
DataTableMapping tableMapping) +38
   System.Data.Common.DbDataAdapter.Update(DataTable dataTable) +159
   btcNET.JoinBTC.Page_Load(Object sender, EventArgs e) in 
\\webslave\wwwroot$\btcNET\JoinBTC.aspx.vb:204
   System.Web.UI.Control.OnLoad(EventArgs e) +102
   System.Web.UI.Control.LoadRecursive() +45
   System.Web.UI.Page.ProcessRequestMain(Boolean 
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +952



Have a nice day.
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, January 12, 2005 1:21 PM
Subject: Re: [AspNetAnyQuestionIsOk] Form wil not submit. UPDATE


>
> Well i didfix the original error with
>
> When calling:
>
> objDataAdapter.Fill(objDataSet, "BTC MEMBERS")
>
> I was asking the DataAdapter to create a table called "BTC MEMBERS". So
> later on when I do this:
>
> objDataTable = objDataSet.Tables("tblBTC")
>
> I am asking for a table from the DataSet that's not there. Changing to 
> this
> fix the problem:
>
> objDataAdapter.Fill(objDataSet, "tblBTC")
>
>
>
> but now im getting an error on the Line were it updates.
>
>            objDataAdapter.Update(objDataTable)
>
>
> Server Error in '/btcNET' Application.
> --------------------------------------------------------------------------------
>
> Update requires a valid InsertCommand when passed DataRow collection with
> new rows.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.InvalidOperationException: Update requires a 
> valid
> InsertCommand when passed DataRow collection with new rows.
>
> Source Error:
>
> An unhandled exception was generated during the execution of the current 
> web
> request. Information regarding the origin and location of the exception 
> can
> be identified using the exception stack trace below.
>
>
>
> Have a nice day.
> ----- Original Message ----- 
> From: "Scott Phelps" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Wednesday, January 12, 2005 4:34 AM
> Subject: RE: [AspNetAnyQuestionIsOk] Form wil not submit. UPDATE
>
>
>>
>>
>> Make sure you have the proper permissions on the database.
>>
>>  _____
>>
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, January 12, 2005 1:29 AM
>> To: [email protected]
>> Subject: Re: [AspNetAnyQuestionIsOk] Form wil not submit. UPDATE
>>
>>
>> It does though. That same code I took from a working page. All the way to
>>
>>>>>            objDataTable = objDataSet.Tables("tblBTC")
>>>>>
>>>>>            objDataRow = objDataTable.NewRow()
>>
>>
>> works on another page. Also if i comment the datarow items out it wil
>> display in the repeater a recod from the dataset and tblBTC. It is on 
>> that
>> one line that it says the error.
>>
>>
>> Have a nice day.
>> ----- Original Message ----- 
>> From: "Dean Fiala" <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Tuesday, January 11, 2005 11:34 PM
>> Subject: Re: [AspNetAnyQuestionIsOk] Form wil not submit. UPDATE
>>
>>
>>>
>>> Odds are objDataTable has not been instantiated  Could be the DataSet
>>> did not fill or the table tblBTC doesn't exist.
>>>
>>> HTH,
>>> -- 
>>> Dean Fiala
>>> Very Practical Software, Inc
>>> http://www.vpsw.com
>>>
>>>
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>> Yahoo! Groups Sponsor
>>
>> ADVERTISEMENT
>>
>> <http://us.ard.yahoo.com/SIG=129o1oam9/M=298184.5639630.6699735.3001176/D=gr
>> oups/S=1705006764:HM/EXP=1105608668/A=2495208/R=0/SIG=11egg01lg/*http://www.
>> netflix.com/Default?mqso=60188914> click here
>>
>> <http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.3001176/D=groups/S=
>> :HM/A=2495208/rand=919136888>
>>
>>  _____
>>
>> Yahoo! Groups Links
>>
>>
>> * To visit your group on the web, go to:
>> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>>
>>
>> * To unsubscribe from this group, send an email to:
>> [EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]
>> e>
>>
>>
>> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
>> <http://docs.yahoo.com/info/terms/> .
>>
>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
> 




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to