473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Catastrophic noob... can anyone help?

So I'm new to access and I keep getting this "catastrophic error" when
running this function. I my mind, all I'm doing is a nested for each
loop with RecordSets Vs collections.

The kicker is, this string will work fine:
' curLine = "call AddBom(""" + inParent + """, """ + curChild +
""",""" + curQty + """)"

But this one give me a "catastrophic error"
'curLine = "call AddBom(""" + inParent + """, """ + curChild +
""",""" + curQty + """,""" + curSeq + """,""" + curPhantom + """)"

I've tried removing all the additional ""'s to no avail. Any ideas?
Thank you, thank you, thank you.
'partial code -- calls problem function
If Not rsAllParents.EOF Then rsAllParents.MoveFirst
Do While Not rsAllParents.EOF
DoEvents

If (rsAllParents!PartNum <> vbNullString) Then
Call CreateFinalOutput(rsAllParents!PartNum, _
rsAllParents!MakeOrBuy)
End If

rsAllParents.MoveNext
Loop
rsAllParents.Close
Public Function CreateFinalOutput(inParent As String, inMOBY As
Integer)

Dim rsChildren As ADODB.Recordset
Dim rsAutoBOMtemplate As ADODB.Recordset
Dim rsAutoBOMtemplate2 As ADODB.Recordset
Dim db As Database
Dim rsAdd As ADODB.Recordset
Dim OutputList As New Collection

Dim sqlcmd As String

Dim curParent As String
Dim curChild As String
Dim curQty As String
Dim curLine As String
Dim curSeq As String 'Make or Buy - Yes? sequence makes as
990's in BOM
Dim curPhantom As String 'is assembly? then code as phantom in BOM

curLine = ""
curParent = ""
curChild = ""
curQty = ""
curSeq = ""
curPhantom = ""

Set rsChildren = New ADODB.Recordset
Set rsAutoBOMtemplate = New ADODB.Recordset
Set rsAutoBOMtemplate2 = New ADODB.Recordset
Set rsAdd = New ADODB.Recordset
Set db = Application.CurrentDb

'Select items to drive loop
sqlcmd = "SELECT * " & _
"FROM tblOutput where Parent = '" & inParent & "'"

rsChildren.Open sqlcmd, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic

If Not rsChildren.EOF Then rsChildren.MoveFirst
Do While Not rsChildren.EOF

curQty = rsChildren!Quantity
curChild = rsChildren!Child
isAssy = rsChildren!isAssy
'If (isAssy) Then
'curPhantom = "p"
'End If
'If (inMOBY = 12) Then 'see ECN.mdb tblTypeDetail [ID 12 =
Make]
' curSeq = "990"
'End If

'curLine = "call AddBom(""" + inParent + """, """ + curChild +
""",""" + curQty + """,""" + curSeq + """,""" + curPhantom + """)"
curLine = "call AddBom(""" + inParent + """, """ + curChild +
""",""" + curQty + """)"

sqlcmd = "insert INTO tblFinalOut (FunCalls) " & _
" VALUES (" & _
"'" & Replace(curLine, "#", "") & "')"

rsAdd.Open sqlcmd, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic

rsChildren.MoveNext
Loop
rsChildren.Close

Set db = Nothing

End Function

Nov 13 '05 #1
0 1183

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ivan Shevanski | last post by:
Alright heres another noob question for everyone. Alright, say I have a menu like this. print "1. . .Start" print "2. . .End" choice1 = raw_input("> ") and then I had this to determine what...
0
by: Veibert M Pinontoan | last post by:
I try to create wrapper for WMSyncReader. The code is :using System; using System.Runtime.InteropServices; namespace WMFSDKWrapper { public class WMFSDKFunctions { public static extern uint...
0
by: miqbal | last post by:
IM getting this error when i try to run Teecharts ActiveX control in asp.net environment can some one help me in it Regards Moid Iqbal Catastrophic failure Description: An unhandled...
2
by: jdanoz | last post by:
Hello, i have a vb.net project with a reference to an ActiveX object (ocx). If i try to use the ocx from vb6 project (adding the reference) it works ok (using CreateObject). In vb.net, the...
0
by: joef | last post by:
I'm running VS.net on my PC (W2K) connected to a remote IIS server (W2K) SP4 that is not a domain controller. I've got the ASPNET and IWAM accounts in the "Impersonate a client after...
2
by: Frav | last post by:
The Reps team have been experiencing that Access 2002 unexpectedly quits while working and also lots of Corruption Failures and "Record lock can not update" messages since the upgrade from...
0
by: cybertoast | last post by:
(Config: SQLServer2005, MySQL5.0 and MySQL4.0 all running on Windows2003 server) I've created linked servers to my MySQL servers from SQL server, and had no problem for several months. I was using...
1
by: santoshsri | last post by:
Hello, While opening an excel worksheet having macros , I get Error "System Error &H8000FFFF Catastrophic failure". When I click on Ok button , I see another message box as Microsoft Visual...
1
by: Fluffy654 | last post by:
First off I am a complete noob when it comes to doing anything with servers. I'm just beginning to learn today because I need to start adding SSI to my websites. I apologise in advance if I am making...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.