oleDB hangs on ExecuteNonQuery

  • Thread starter Thread starter jimj
  • Start date Start date
J

jimj

The line insertStatus = cmdInsert.ExecuteNonQuery() is hanging; although the
INSERT is working, because after I kill the application, I can see the new
row.
The OLE DB provider is set to IBM DB2 UDB for iSeries IBMDA400 OLE DB
Provider.

Private Function VS_Insert(ByVal pndAmt As Decimal) As Boolean

Dim currTime As String = Format(DateTime.Now, "HH.mm.ss")
Dim currDate As String = Format(DateTime.Now, "yyyy-MM-dd")
Dim success As Boolean = False
Dim cnInsert As New OleDb.OleDbConnection(My.Settings.connAS400)
Dim cmdInsert As New OleDb.OleDbCommand
Dim insertStatus As Integer = 0

cmdInsert.Parameters.Clear()

Dim query As String = "INSERT INTO PRODUCTION.DVABDAPV " & _
"(PONBR, LINENR) " & _
"VALUES (?,?)"

With cmdInsert
.CommandText = query
.CommandType = CommandType.Text
.Parameters.Add("?", OleDb.OleDbType.Char).Value = PONr
.Parameters.Add("?", OleDb.OleDbType.Char).Value = lineNr
.Connection = cnInsert
End With

handleConnection(cnInsert)

insertStatus = cmdInsert.ExecuteNonQuery()

If Not insertStatus = 0 Then
MsgBox("The select failed")
success = False
Else
MsgBox("The select WORKED")
success = True
End If

handleConnection(cnInsert)

Return (success)
 
How fortunate that I have paid top dollar for an MSDN subsription for
the last 5 years, and post messages to the Managed newsgroups, but
rarely see a response. I thought the deal was, Microsoft responded
within x hours. I see a lot of posts that never get an answer. I
won't be renewing my MSDN subscription any more, as I can somehow
stumble through the insane help in VS 2008 or better yet, convince my
superiors that we need to move to 'Open Source' development.
 
Sounds to me like a non .net problem - either provider or database.
Did you ask IBM about this?
 
Just FYI, this newsgroup is also a public newsgroup. Not everyone that posts
here has an MSDN subscription (in fact, few seem to), and not everybody that
offers help works for Microsoft (MSFT only answers questions posed by MSDN
members). I would start by making sure you are in a newsgroup that is
supported. (No, I have no idea which ones those are.)

RobinS.
GoldMail, Inc.
----------------------------------
 
How fortunate that I have paid top dollar for an MSDN subsription for
the last 5 years, and post messages to the Managed newsgroups, but
rarely see a response. I thought the deal was, Microsoft responded
within x hours. I see a lot of posts that never get an answer. I
won't be renewing my MSDN subscription any more, as I can somehow
stumble through the insane help in VS 2008 or better yet, convince my
superiors that we need to move to 'Open Source' development.

They respond and very consequent, the only thing is that you have to use the
Microsoft web newsgroup interface and to log on on to that with the email
address that belongs to your MSDN subscripty.

Cor
 
They respond and very consequent, the only thing is that you have to use
the
Microsoft web newsgroup interface and to log on on to that with the email
address that belongs to your MSDN subscripty.

I think that proper e-mail address is enough. Not sure though.
 
How fortunate that I have paid top dollar for an MSDN subsription for
the last 5 years, and post messages to the Managed newsgroups, but
rarely see a response. I thought the deal was, Microsoft responded
within x hours. I see a lot of posts that never get an answer. I
won't be renewing my MSDN subscription any more, as I can somehow
stumble through the insane help in VS 2008 or better yet, convince my
superiors that we need to move to 'Open Source' development.

If you're not getting a timely response (I believe MS promises 48 hours)
then I would guess that you have not created a posting alias. I had this
same problem before I created my posting alias. Once created you can either
use the MS Web News to access the newsgroups or you can use your own
newsreader. When you use your own newsreader your reply address must match
the posting alias you created or there is no guarantee of a response (timely
or not) to your posts.

This newsgroup is listed as a managed newsgroup.

Try going to this link and you should find an explanation about what to do.

http://msdn2.microsoft.com/en-us/subscriptions/aa974230.aspx

hth
 
How fortunate that I have paid top dollar for an MSDN subsription for
the last 5 years, and post messages to the Managed newsgroups, but
rarely see a response. I thought the deal was, Microsoft responded
within x hours. I see a lot of posts that never get an answer. I
won't be renewing my MSDN subscription any more, as I can somehow
stumble through the insane help in VS 2008 or better yet, convince my
superiors that we need to move to 'Open Source' development.

I love using open source products and participating in their
projects. However, this is a very unabashed troll-like post. Do you
think that using open source development tools mean you get a timely
and high quality response from vendors that take your money to support
an open source project? I think you have a rude awakening when you
finally obtain your open source development support paradise.

Michael O
http://blog.crisatunity.com
 
How fortunate that I have paid top dollar for an MSDN subsription for
the last 5 years, and post messages to the Managed newsgroups, but
rarely see a response.

MSFT use a database to check incoming names so if you aren't using your
MSDN subscription name they will miss you. I have always had an excellent,
prompt and helpful response from MSFT staff.

Unfortunately in MSFT groups other responses can be a bit rare sometimes.
 
Back
Top