Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Help : Run Time Error 10048

when i run this code to listen to http port

With Winock1(0)
If .State <> sckClosed Then .Close
.LocalPort = 80
End With

I get this Error: Run Time Error 10048

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Winsock 10048 Error
Hi All,

[RESOLVED: Problem was that I had another winsock control already listening on the same port numbers! Silly me!]

Firstly I apologise for the long post. I just need to get this sorted. I've been searching all night and can't seem to find an answer. I have a winsock control array on my server form, and a winsock control on my client form.

Ive written a procedure to gather all the data so i don't miss anything coming through the GetData buffer, and all seems to work well I can get data from A-B without loss, and reliably.

Until I close my client, and attempt to open and reconnect (very important to be able to do this quickly) My searching keeps bringing me back here ->

my code is lengthy, with all sort of junk in between, but the general settings are:

server: sckServ
.RemotePort = 4411
.LocalPort = 4511

client: sckClient
.RemotePort = 4511
.LocalPort = 0

this all works fine and is no problems except for when I try to reconnect I get the dreaded address in use error. MS tells me to set localport as 0.. so I change my sckServ.LocalPort to 0, no longer connects my client throws a state of '6' then shortly after switches to state '9'.. i.e doesn't connect at all. Admittably the error is no longer there.. but my app is not very usable.

I understand the workings of the TCP stack enough to know it will keep a port mapped to an app, unless its closed properly. I'm using the standard .Close method of the winsock control.. should this supplemented with anything else?

Bear in mind that at the moment this is only dealing with one of the sckServ in an array (i haven't got far enough to try that out yet), and I want to use a specific port-set so I can configure port forwding on my router and use this app from work.

A couple of suggestions that I have tried include: <- the API I haven't tried but i am in the process of working through it with a sample app im making specifically for this error. If anyone has tried that I'd love to know how you got on with it.

Thanks in advance for any replies, advice, suggestions etc.. I'm really stumped on this one.


Winsock 10048 SckAddressInUse
Could someone pls tell me what conditions, when using a winsock control array with sckTCP(0).Listen, trigger the sckAddressInUse error?

Error Msg - "Run-Time Error &#039;-2147417848(80010108)&#039;: Automation Error
I have a menu-item which when clicked starts up a browser and goes to the site which the user selected from the appropriate menulist. It works fine in VB6 when I click on the play button, (design time). However, after using the Package & Deployment Wizard, I get the following error message: "Run-Time error '-2147417848(80010108)': Automation Error What in the world is going on. Is it that the browser object is not installing correctly since it works in the VB6 environment? :-( Or is it some code that is creating the problem. I am still new at this, but making great progress. Just ready to get this beta out to some of my testers.

I was under the impression that if you could run the program during the design process without any problems, then you could run it after compiling and packaging with the Deployment Wizard.

email should be on my post,... however it is:


Run Time Error '35761' Request Time Out
Any body knows about Run time error '35761' request time out and better way to handle this error in asynchronous transfer (inet1.execute). Do I have to handle this in the regular error handler On error GoTo... or using the icError in State_Changed event ?

Prashant J.

VB 6 - Run-Time Error 3075 Syntax Error (Missing Operator) In Query Expression
Hi all
sorry for the inconveniences, I just wanna get this syntax thing out of my back.

I modified my vb module and now I'm getting "Run-Time error 3075 syntax error(Missing operator) - query expression"

Then it displayed this line of code as the problem line:

'TblPersonnel.[Name] = TblRequests.Personnel1 Union All
Select TblRequests.ProjectID'.

Below is the complete module:

DbPath = "\515opsisdallf00008SHAREDPyrlAppsPTStest2"

DbName = "PTS.mdb"

Set Db = OpenDatabase(DbPath & DbName)

strSQL = "Insert Into TblProgrammersHours (ProjectID,ProgrammerInitials, CurrProgHrs, PrevProgHrs, TotalProgHrs, Positions)"

strSQL = strSQL & " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog1hrs, TblRequests.PrevProg1Hrs, TblRequests.TotalProg1hrs, 1 As Position " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel1 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog2hrs, TblRequests.PrevProg2Hrs, TblRequests.TotalProg2hrs, 2 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel2 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog3hrs, TblRequests.PrevProg3Hrs, TblRequests.TotalProg3hrs, 3 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel3 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog4hrs, TblRequests.PrevProg4Hrs, TblRequests.TotalProg4hrs, 4 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel4 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog5hrs, TblRequests.PrevProg5Hrs, TblRequests.TotalProg5hrs, 5 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel5 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog6hrs, TblRequests.PrevProg6Hrs, TblRequests.TotalProg6hrs, 6 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel6 "

strSQL = strSQL & ") As NewProgHrsTbl"

Call Db.Execute(strSQL)

Run Time Error (80040111) Automation Error ClassFactory Cannot Supply Requested Class
Anyone ever get this error ?

Run-time error '-2147221231 (80040111)':

Automation error
ClassFactory cannot supply requested class

I get this error when i am doing a Set MyShortcut = VBsObj.CreateShortcut(ShortCutPath & ".lnk")

I am only trying to create a shortcut here...and the server running this program is Windows 2000... Please advise..

Run-time Error '3077' Syntax Error (missing Operator) In Expression - Is Comming, Plz Help
Hi everyone

I made a small project in VB and getting error sometimes on this line.

it come when A contain ( ' or " )

it does not come when A does not contain this charactor ( ' or " )

Text1.Text = lstFilSrch.Text
Dim a As String
a = Text1.Text
Data1.Recordset.FindNext "hindi= '" & a & "'"

Rishi Acharaya

Getting A Run-time Error '3134' Syntax Error In INSERT INTO Statement
Private Sub cmdMass_Click()
Dim db As Database

Dim rs As Recordset

Dim datHold As Date

Dim datStart As Date

Dim datEnd As Date

Dim intID As Integer

Dim strSQL As String

Set db = CurrentDb

Set rs = db.OpenRecordset("qryEmployeeIDs") 'gets unique IDs


datHold = #12/30/2000#
datStart = datHold

Do While Not rs.EOF

Do While datEnd < #4/1/2006#
datEnd = DateAdd("d", datStart, 13)
intID = rs![Employee_ID]
DoCmd.SetWarnings False

strSQL = "Insert tblSick_Leave(Employee_ID, Pay_Period_StartDate, Pay_Period_EndDate,
Begining_Balance_Hours, Begining_Balance_Minutes, Earned_Hours,
Earned_Minutes, Used_Sick_Hours, Used_Sick_Minutes,
Ending_Balance_Hours, Ending_Balance_Minutes) Values ('" & intID & "', #" &
datStart & "#, #" & datEnd & "#, '0', '0', '0', '0', '0', '0', '0', '0')"
datStart = DateAdd("d", datStart, 14)

Set rs = Nothing
Set db = Nothing

DoCmd.SetWarnings True

End Sub
First, allow me to say that I have broken the statement down to multiple lines for readability issues here. Basically, what I want it to do is insert the date ranges for previous pay periods into the table or each employee as well as entering 0 into the record for each other field in the table. I am having a few issues with that as I am getting this error and I have tried everything to get it to work, but I keep getting this runtime error. Any thoughts on this?

VB Error While Connecting To Oracle =Run-time Error '-2147467259 (80004005)'
I have created a VB program using VB6 to connect to Oracle8i Release Below is DLL that i use and my connection string.

microsoft ActiveX Data Objects 2.5 Library
"Provider=MSDAORA.1;Password=" & strpassword & ";User ID=" & strUserId & ";Data Source= & strdbservice

This error occurred while connecting :
"Run-time error '-2147467259 (80004005)':
oracle error occurred, but error message could not be retrieved from oracle."

However, after 3 - 4 times of attempt i manage to connect to the database without any problem. So each time i run my vb file I need to click a few times until it manage to go through my itself.
Average attempt is 3 times.

Please help.

Run-time Error '40006' : Wrong Protocol .... &lt;== How This Error Occurs?
Run-time error '40006' :
Wrong protocol or connection state for the requested transaction or request.

How this error occurs?
What error is it about?
How can we fix this error?

In my vb-application I used winsock and timer control.
And set timer to run every 5 minute.
But this error occurs unexpectially.

Best Regards

Run-time Error '8020' Error Reading Comm Device

how to solve Run-time error '8020' - (Error reading comm device )

any ideas?


Inno Set-up Error: Start Menu Run-time Error 53

My first app. is near enough complete and I have started to try to distribute it. I'm using Inno to package it, but when I then install it on another machine, it all unpacks properly.

It sets up the entry on the start menu but when I click to launch I get a run-time error 53 File not found. I can go to the file and it launchs fine but for some reason the shortcut fails.

I guess there's something wrong in the following but I have no experience of these scripts:
Name: {group}{#MyAppName}; Filename: {app}{#MyAppExeName}
Name: {group}{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}
Name: {userdesktop}{#MyAppName}; Filename: {app}{#MyAppExeName}; Tasks: desktopicon

Please can someone help it's driving me mad, the properties of the target for the shortcut comes up right except it doesn't have the 'Start in:' field filled in (if I set one up manually then it is filled in and it works)
How can I set this in Inno?

Many thanks in advance!

Run Time Error: 75 - Path/File Access Error

I have packaged a program with the Deployment Wizard, and have installed the program on my computer for testing. However when I go to run my app error 75 - Path/File access error pops up. Is it possible that the wizard has packaged a .ocx file or something that is used by some other application in windows 98? Or could it be something in my code? Thanks

How To REPLACE Run-time Error '8005' With Other Error Message Box?

I wrote a simple program as follows:

Private Sub Form_Load()

MSComm1.PortOpen = True
MSComm1.OutBufferCount = 0
MSComm1.InBufferCount = 0
MSComm1.InputLen = 0

End Sub

As shown in the code listing above, when the Form is loaded, the serial port is set to be OPEN (MSComm1.PortOpen = True). However, when there is another program using the COM port, e.g. modem, an error message as the following will appear when the program is executed.

Run-time error '8005':
Port already open

If HyperTerminal is excecuted while modem is active, an error message as the following is shown:

Another program is using the selected Telephony device.
Try again after the other program completes.

Would anyone please advise whether there is any method to replace the error message "Run-time error '8005'. Port already open" with custom-made error message, e.g. "COM 1 is already occupied. Try again after the other program completes or try to use other COM ports".

Thousand thanks in advance


Run-time Error -2147467259 (80004005) Unspecified Error
Hello all, I am writing quite the complicated little program here and need your help with an error.
First off I am writing a program that will view an access database that contains 3 levels of parent child forms. Since you cannot have embedded forms in VB 6.0 I am writign code using ADODB connections and recordsets. Now how it works is basically you have records loaded into the parent form, and on this parent form are 4 buttons. When you click on a button another form appears (child form) and the records for that form based on the parent forms record appear. Now there are 4 child 1 forms, so if you click on another form then the previous one closes, that way only one child recordsource is open at all times. Now one of my child forms has child forms of its own.
Now to the problem. I can have 3 windows open at once, the parent, 1 child1 and one child2 form. When I scroll through my records from the parent form the records do appear in the 2 child forms, but after a while I will get an error for the first child form which is:

run-time error -2147467259 (80004005) Unspecified error

Now I will show you a sample of the code and you can tell me what I am doing wrong.


'Create variables
Set cnChild1 = New ADODB.Connection
Set rsChild1 = New ADODB.Recordset

'Connect to database
cnChild1.ConnectionTimeout = 0
If cnChild1.State = 0 Then
cnChild1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=databaseMasterDatabase2004.mdb" ****THIS LINE GIVES ME THE ERROR
cnChild1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=databaseMasterDatabase2004.mdb"
End If

'Get STATNUM value from station form and show only lithologies from that station
varStatnum = Station.txtStatnum.Text
strSQL = "select * from LITHOLOGY_TABLE where STATNUM = '" & varStatnum & "' order by ROCKNUM"

'Open connection
rsChild1.Open strSQL, cnChild1, adOpenStatic, adLockReadOnly
Since it only craps out after lookign at around 30 to 50 records I know my code elsewhere is fine, just that for some reason my open statement will crash on me. Is there a more secure way of making sure it will not crash on me. I tried error handlers like resume and actually unloading and reloading the form) but they do not work.


Run-time Error: '-2147418105' (80010007) - Excel Vb Error
I have a function in excel which basically when a spreadsheet is editted in a certain column the data is then grabbed and taken to the corresponding cell in another worksheet.

The failing line is:


'The declaration of this is (accompanied with updater):
'stops screen updates and opens up the "saving dialogue" so the user knows to wait
Application.ScreenUpdating = False
Dim saver As New frmSave

'turns screen updating and closes the saving form
Application.ScreenUpdating = True
saver.Hide '#### ACTUAL ERROR LINE

This is the error I get:
Automation error
The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.

I hope someone can help I'm not overly familiar with this type of error



Run Time Error 3043: Disk Or Network Error
Hi All,

I have developed a VB6. application which connects to two database SQL Server and MS access. User connects to SQL database using windows authentication.

I have applied user impersonation in code. In code application first connect to SQL database which can present at the same or any other machine. After that application connects to Access database which is present at the same machine. Now if I use same user in windows and application then my application works fine. But I use one user in windows and other user in application then I am able to connect SQL Server database but when it tries to connect .mdb(access) database it is giving an error "Disk or network error".

How Do I Make Error Free To This Problem(Run-time Error)?
Hello all,
I have a problem in VB 6.0. I am working in an application that sent message to the remote machine by using Winsock. But in some case,

"RUN TIME ERROR '-2147168242(8004dOOe)'

is generated. Apparently this error means "attempting to use a transaction, and none has been defined or attached". How do we fixed this type of problem?

Can anyone help me to solve this problem.


Run-time Error 75 (path/file Access Error)
I am using a common dialog to search for a file, but when I click on Cancel and there is no filename in the filename field of the common dialog, I get the error on the highlighted line:



Run-time error '75':
Path/File access error.

VB Code:
Private Sub cmdImportDatabaseConnectionString_Click()    With cdlgImportDatabaseFile        .CancelError = False        .DialogTitle = "Import Database Connection Settings"        .Filter = "Database File (*.dbs)|*.dbs"        .ShowOpen        m_strFileName = .FileName    End With        [hl]FileCopy m_strFileName, App.Path & "" & m_strFileName & ".dbs"[/hl]End Sub

Run-time Error '75': Path/file Access Error
So I tried to create a program that created a folder in the Windows directory and then copied a certain file to that newly created directory. I have accomplished this, oddly, on my computer only. When I send the program to others to use they receive this error:

[run-time error '75'....path/file access error]

Anybody seem to know the problem?

I will paste partial code if needed.

Run-time Error &#039;75&#039;: Path/File Access Error
Ok I downloaded an old version on to one of the teachers computers just so she could get started with making the vocab lists. The first time i started it up it ran fine but then the second time the splash screen came up then this error came up.
Run-time error '75':
Path/File access error
I resarted the comp and same thing i reistalled it and same problem. do you have any suggestions? Here is the installation package. Remember this is old version like 2 weeks old I have added much more. you need winzip to unpackage it. Here is the un packaged source code for ya if you can like get it to work it fits on a disk. .
If you could help me with this one i would be truly grateful!!!

:-) ;-)


just have fun out there and live life to the fullest while it is still here


[This message has been edited by PITBULLCJR (edited 02-07-2000).]

Run Time Error '1004' General ODBC Error.
I customised a downloadable Macro in Excel sheet that is meant to connect to my Oracle database to do some charting.

Here is an excerpt of the code where the runtime error occurs in line ".Refresh" (second end line).

As I am not a programmer, this really gives me a challenge. Anyone mind to help? Thanks in advance.

strSQl = "select timestamp,mb_used,mb_free " & _
                     "from v_ora_db_space " & _
                     "where db_status='" & strDbStatus & "' order by 1"

     With ActiveSheet.QueryTables.Add(Connection:=strDbConnection, _
                Destination:=Range("A1"), Sql:=strSQl)
                ActiveSheet.QueryTables(1).BackgroundQuery = False
               .Refresh ' run the query
            End With

Time Error '3021' Eof Or Bof Sometimes But Not All Teh Time
hello all
here is my problem I am testing a VB/Acess app in 98, 2000, xp home and pro.
My app will write as record out to a table when testing in any OS.
I then run a sql statement to pull back the record
ie select * where  [name] = 'john'

the reocrd containing the name john is present on all PC's with all OS's but when I execute this sql statement on the XP Pro or the win 98 OS boxes I get the following error
'either EOF or BOF is true or record has been deleted'

when I execute the same code on w2000 or XP home I do not get any error and the record is returned.

If I open the table in Access in XP pro or win98 and execute the same sql statement from the  the query screen it will return the reocrd

what is going on?

not a very good description I admit but any suggestions as yo how I can debug this?

Common Dialog Error Run-time Error
I have an app (VB6) which uses the Common Dialog Conrol (Microsoft Common Dialog Control 6.0 (SP3)) to allow the user to browse for a folder path and specify a filename.

On my machine, both in code and the compiled exe, this works fine, no problems - this is also true when running on another machine as well.

However when I run the app on another test machine and attempt to open the common dialog box I get a run time error:

Run Time Error '5'
Invalid Procedure Call or Argument

If I debug the app and run it in the IDE on this machine I do not receive this error so I am at a loss as to what it could be.

The code I use to open the common dialog box is:

sFileName = GetSaveFileName("ReportName")

Which calls the function getsavefilename which is:

Private Function GetSaveFileName(ByVal sReportName As String, Optional ByVal bCopiedFile As Boolean = False) As String

On Error GoTo catch

If Not bCopiedFile Then
cDLG.FileName = sReportName & "_" & Replace(Format(Now, "dd mmm yyyy"), " ", "_")
cDLG.FileName = Replace(cDLG.FileName, ":", "-")
cDLG.FileName = sReportName
End If

cDLG.DialogTitle = "Open File"
cDLG.InitDir = "C:"
cDLG.Filter = "Excel Files (*.xls)|All Files (*.*)|*.*"

cDLG.CancelError = True

GetSaveFileName = cDLG.FileName

If Err.Number = 32755 Then GetSaveFileName = "***Cancelled***"

End Function

As I say, this works on some machines and not on others, and on the machine it doesn't work on when running through code no error is thrown.

Has anyone got any idea what could be causing this? I am at a loss as to what it could be. This is running on Windows XP.

Thanks in advance.

Disk Or Network Error/Run Time Error 91
I'm trying to open a project I started at school here at home but I keep getting this error. I'm not sure what it is because this worked just fine at school.

It also leaves me this message with the run time error 91.

"Object variable or with block variable not set"

and points me to this part of my code when I press 'debug'

"Private Sub Form_Activate()
lblName.Caption = Str(datPlayers. _
Recordset.AbsolutePosition + 1)"

I'm sure it's not that hard to fix, but I'm lost.

Run-time Error 80040e07: Automation Error
Hi, i try to export data from excel to my access 2000 database and i got this error when i execute my code:


strSql = "insert into tblAtelkaAgentCampagneTrain(ID,PPAID,FidoOut,Rogers,Polaris,RAC,Quebec or,Videotron)" & _
"values(" & strID & ",'" & strPPAID & "','" & strFidoOut & "','" & strRogers & "','" & strPolaris & "','" & strRAC & "','" & strQuebecor & "','" & strVideotron & "')"

cnx.Execute strSql

and there is the value of strSql:
"insert into tblAtelkaAgentCampagneTrain(ID,PPAID,FidoOut,Rogers,Polaris,RAC,Quebec or,Videotron)values(9999911,'False','False','False','False','True','Tr ue','False')"

could somebody help me with that.


Run-time Error '8052' General Error
I had this code for my DataReport and as I run the report, run-time error '8052' General Error occurrs. Please help me solve this problem. Thanks...

Private Sub DataReport_Initialize()
Dim rpcn As New ADODB.Connection
Dim param As New ADODB.Parameter
Dim cmdrs As New ADODB.Command

Dim rs As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset

Dim n As Integer
Dim delno, deldate, controlno, shipvia, checkedby As String
Dim customer, street, city, country As String
Dim cost, total, gross As Double

If rs.State = adStateOpen Then rs.Close
rs.Open "SELECT Delivery.*, Company.Name, Shipments.ShipmentName" _
& " FROM Delivery INNER JOIN" _
& " Company ON Delivery.CustomerID = Company.CompanyID INNER JOIN" _
& " Shipments ON Delivery.ShipVia = Shipments.ShipmentCode" _
& " WHERE (Delivery.DeliveryNo = '" & frmDelivery.lblDeliveryNo & "')", cn, adOpenDynamic, adLockOptimistic

If Not rs.BOF Or Not rs.EOF Then
If rs1.State = adStateOpen Then rs1.Close
rs1.Open "SELECT Address.*, Countries.CountryName,Company.Name" _
& " FROM Company INNER JOIN" _
& " Address ON Company.ShiptoAddress = Address.AddressID INNER JOIN" _
& " Countries ON Address.Country = Countries.CountryID" _
& " WHERE Company.CompanyID='" & rs.Fields("CustomerID") & "'", cn, adOpenDynamic, adLockOptimistic

delno = rs.Fields("DeliveryNo")
deldate = rs.Fields("DeliveryDate")
shipvia = rs.Fields("ShipmentName")
controlno = rs.Fields("ControlNo")
checkedby = rs.Fields("checkedby")
cost = rs.Fields("AdditionalCost")
total = rs.Fields("TotalAmt")
gross = rs.Fields("GrossTotal")

If Not rs1.BOF Or Not rs1.EOF Then
customer = rs1.Fields("Name")
If LCase(rs1.Fields("streetaddress")) <> "n/a" And rs1.Fields("streetaddress") <> "" Then
street = rs1.Fields("StreetAddress")
End If

If (LCase(rs1.Fields("state")) <> "n/a" And rs1.Fields("state") <> "") And (LCase(rs1.Fields("city")) <> "n/a" And rs1.Fields("city") <> "") Then
city = rs1.Fields("city") + ", " + rs1.Fields("state")
ElseIf (LCase(rs1.Fields("state")) = "n/a" And rs1.Fields("state") = "") And (LCase(rs1.Fields("city")) <> "n/a" And rs1.Fields("city") <> "") Then
city = rs1.Fields("city")
ElseIf (LCase(rs1.Fields("state")) <> "n/a" And rs1.Fields("state") <> "") And (LCase(rs1.Fields("city")) = "n/a" And rs1.Fields("city") = "") Then
city = rs1.Fields("state")
End If

If LCase(rs1.Fields("zipcode")) <> "n/a" And rs1.Fields("zipcode") <> "" Then
country = rs1.Fields("CountryName") & " " & rs1.Fields("zipcode")
country = rs1.Fields("CountryName")
End If
End If
End If

rpcn.CursorLocation = adUseClient
rpcn.Provider = "MSDataShape.1"
'rpcn.ConnectionString = "Data Provider=SQLOLEDB.1;Password=password;Persist Security Info=True;User ID=Administrator;Initial Catalog=ERP;Data Source=WEBSERVER"
rpcn.ConnectionString = "Data " + ConnectStringVal
rpcn.Open = "Parameter 0"
param.Value = frmDelivery.lblDeliveryNo
param.Type = adChar
param.Size = 20
cmdrs.Parameters.Append param

cmdrs.CommandText = " SHAPE {SELECT * FROM Delivery where DeliveryNo=?} AS rsDelivery" _
& " APPEND ((SHAPE{SELECT DeliveryDetails.*, DeliveryDetails.CurrencyUsed + CONVERT(nvarchar(100), DeliveryDetails.UnitPrice) AS UPrice,Products.ProductName FROM Products INNER JOIN DeliveryDetails ON Products.ProductCode = DeliveryDetails.ProductCode where DeliveryDetails.DeliveryNo=?} AS rsDetails" _
& " APPEND ({SELECT * FROM DeliverySerials where ProductCode=? and DeliveryNo=?} AS rsSerial RELATE 'ProductCode' TO 'ProductCode','DeliveryNo' TO PARAMETER 0)as rsSerial)AS rsDetails RELATE 'DeliveryNo' TO 'DeliveryNo','DeliveryNo' TO PARAMETER 0) AS rsDetails"

cmdrs.ActiveConnection = rpcn
cmdrs.CommandType = adCmdText
Set rs2 = cmdrs.Execute

If Not rs2.BOF Or Not rs2.EOF Then
With rpDelivery
Set .DataSource = rs2
.Sections("Section2").Controls("lblDeliveryNo").Caption = delno
.Sections("Section2").Controls("lblDate").Caption = deldate
.Sections("Section2").Controls("lblShipvia").Caption = shipvia
.Sections("Section2").Controls("lblcontrolno").Caption = controlno
.Sections("Section2").Controls("lblcheckedby").Caption = checkedby
.Sections("Section2").Controls("lblCustomer").Caption = customer
.Sections("Section2").Controls("lblStreet").Caption = street
.Sections("Section2").Controls("lblCity").Caption = city
.Sections("Section2").Controls("lblCountry").Caption = country
.Sections("Section5").Controls("lblTotal").Caption = FormatCurrency(total)
.Sections("Section5").Controls("lblcost").Caption = FormatCurrency(cost)
.Sections("Section5").Controls("lblGrossTotal").Caption = FormatCurrency(gross)
End With
End If
closeRS rs
closeRS rs1
closeRS rs2
End Sub

VB6 - Run-time Error ,50003' - Unexpected Error

I mave massive problems with the the following error when I start my
software. And it must be solved by the installation somehow.

"Run-time error ,50003' - Unexpected error"

I read that this might be caused by the usage of the common controls and the
problem with the linked version and the installed version on the system.
Therefore I have tried to force my installation to update all necessary ocx
files (also because I always use the latest version), but this did not help.

Using remote desktop on a PC this error always appears. On some clients the
error always appears when the software is started.

How can this be solved?!!

I guess it's a standard problem with VB programms and the corresponding
installation of the controls, dlls and so on.
But didn't find a reliable solution.

Please help!

Best regards

P.S.: Does anyone know a static compiler for VB with a fair price? I start to hate these problems of VB...

Run-time Error Automatic Error This Resource Is In Use.
i get that on startup not sure why

VB Code:
Private Sub Form_Load()        webby.Navigate ""        MsgBox "Test    With StatusBar1        .Panels(1).Width = 11600        .Height = 350    End With    Status Me, "Initialising programmingEnd Sub

Run-Time Error '383? Listview Error?
Run-Time error '383
Property is read-only

VB Code:
Dim F' in the listview i have 14 items added. F = 5 ' this is item 5 in listview i want to be highlightedOn error goto iiF    'When i removed the goto label iiF                              ' thats when i saw                              ' Run-Time error '383                              ' I did this to find out why i could not select                              '  Row 5                               Listview1.SelectedItem.Index = F   'What do i need to do select item 5 in listview1   iiF:exit subend sub

Run-time Error 20000 No Error
Please help me on this bug

run-time error 20000
No Error

I found that the error is because of crystal reports but how to solve it

Described as

I have written code which connects a report designed in crystal report, it contains some 20 formulae fields each supplied with a value from the front-end and all the formulaes are designed in page-header of the crystalreport.

"Run-time Error 424 - Object Required" Error When Upgrading A Activex Control
When I compile (upgrade) a activex control the program using it gives an error saying "Run-time error '424' - Object Required". If you delete the object from the vbp file and reopens the program and add the component again it'll work just fine.. But as soon as I try to upgrade this error will occur when trying to see the form of the new project using the upgraded activex control. The upgrade procedure seems to work fine though and the error occurs, as I said, only when I try to see the form of the project.

Error In Running A Screen Saver "Run-time Error '6' Overflow"
Im running the program screen saver but i receiving this error its says Run-time error '6' Overflow i hope anyone could fix this thanks ...

VB Code:
Private Sub Form_Load()Dim res   'I made this array to translate name of day to Indonesia   'language. You can change this array elemen to your   'country language. Start from Sunday...   aHari = Array("Sunday", "Monday", "Tuesday", "Wednesday", _                "Thursday", "Friday", "Saturday")   sHari = aHari(Abs(Weekday(Date) - 1))   frmMain.Caption = "LOGIN PROGRAM Versi 1.0"   frmMain.Timer1.Enabled = False   Timer1.Enabled = True   DoEvents   Label1.Caption = "" & sHari & ", " _                   & Format(Date, "mmmm dd yyyy")   Label2.Caption = Format(Time, "hh:mm:ss")   DoEvents   App.HelpFile = ""   res = SetWindowPos(frmScreenSaver.hWnd, _                      HWND_TOPMOST, 0, 0, 0, 0, _                      flags)End Sub

But its only highlightened at

VB Code:
App.HelpFile = ""res = SetWindowPos(frmScreenSaver.hWnd, _                      HWND_TOPMOST, 0, 0, 0, 0, _                      flags)

Run-time Error 713 Application-defined Or Object-defined Error --&gt; Unique To User!
Ok I know this question has come up before... I searched the forum and found all the answers I've already tried... missing files, registering the libraries, etc.

Unfortunately I haven't found anything that makes reference to the problem I'm seeing!

I'm receiving the runtime error 713 (application-defined or object-defined error) message when I try to start my app on a client machine, but only under a particular user account!

If I log in with my user account (local admin, domain admin) the application runs fine.

If I log in with the end user's account (local admin, domain user) the application craps out!

All the files are installed locally on the machine. It uses SQL2000 as the backend but all calls are through a common database account.

I've tried unregistering and re-registering the files while logged in as the user but it doesn't seem to work.

If I log in as another user with the same credentials everything works fine.

Any ideas!??! I'm really stuck and the client is breathing down my neck...

Thanks in advance.

Run-time Error Time Out
I've a problem with a run-time error (-2147217871) after a SELECT query over a SQL DB (only one table). I think it happen because there are others heavy program that write on this table.

How can I override this error ?


Run-time Error '1004': Application-defined Or Object-defined Error

Im trying to copy a column fron a sheet called ACTUAL to a sheet called IMPERIAL and then depending on the value of cell C2, copy the same column to another workbook called EXPEDIENTES.
The problem comes with the second part of the code, the column is not copied into the other workbook. Here is part of the code:

Private Sub imperialpegar_Click()
Dim tanq As Integer

Selection.Insert Shift:=xlToRight
Application.CutCopyMode = False
tanq = Range("C2").Value

Select Case tanq

Case 1
Workbooks("EXPEDIENTES").Sheets("TANQ 1").Range("C:C").Activate
Range("C:C").Activate => HERE IS WHERE I GET THE ERROR MESSAGE!!!!!!
Selection.Insert Shift:=xlToRight

Case 2
Sheets("TANQ 2").Select
Selection.Insert Shift:=xlToRight

End Select
End Sub

I would really appreciate any help.
From Costa Rica.....siodog

Run Time Error 31031 (Application Defined Or Object Defined Error)
I have written a visual basic program for placing a tool bar which aligns itself to the minimize or maximize buttons for each window. The toolbar has five buttons and clicking each button executes an application. The applications are linked to the buttons using OLE and i store the link information in an Access Database (Access 97)
I have used the DATA control. I have provided means for changing the links for the buttons to the user. The user can select any .exe or .scr or .com files and i replace the new link with the old link in the Database using the DATA control. I have compiled the program to a executable (.exe).

The program runs without any errors in my primary hard disk in which i have loaded the VB 6 and in which i wrote the coding. But i am not able to run the same .exe file in my other (secondary slave) hard disk in which it says and error

Runtime Error 31031
Application defined or object defined.

and the program automatically quits.

I have loaded VB 6 even in this hard disk.
I am not able to trace out this error. Kindly help me solve this problem.

Run Time Error 32797 :application-defined Or Object-defined Error
Well my project is based on database application....the application that i made runs in my computer(one used to develop application).....but when i installed and tried to run that application in another computer, then it showed following error
I used PD wizard for making setup installation file.

run time error 32797
application-defined or object-defined error

please help me out with this

VBA "run Time Error '9' SubScript Out Of Range" Error Occured Plz Help
Hai friends,
I am new to Visual basic so i have not a depth knowldge of it that why i need urs help.

In my Problem i want to select one value from the combo box and i want that another value which is in database can show automatically in another textbox on the selection of the distributer.

just like that "state is shown on the selection of country"

plz help and thanx is advance.

The code is

'Change Distributor List on basis of checkBox if Indian Title is Checked
'--------then indian distributor list displayed in Distributor combo box else international list
Private Sub chklocal_Validation(Cancel As Boolean)
   Dim intCount, tempFieldArr
   If Chklocal.Value = 0 Then 'If uncheked
    cboDistributer.Clear 'Clear the Distributor combo
        txtDiscount = ""
        flag = 0 'Means global
        For intCount = 1 To objindianDistributors.Count 'For 1 to international distributor collection
            tempFieldArr = objindianDistributors.Item(intCount) 'Fill items one by one in a Array
            cboDistributer.AddItem tempFieldArr(1) & " / " & tempFieldArr(2) & " / " & tempFieldArr(0) 'Add Array items into combo
    ElseIf Chklocal.Value = 1 Then 'If Checked
        cboDistributer.Clear 'Clear the Distributor combo
        txtDiscount = ""
       flag = 1 'means local
        For intCount = 1 To objInternationalDistributors.Count
            tempFieldArr = objInternationalDistributors.Item(intCount)
            cboDistributer.AddItem tempFieldArr(1) & " / " & tempFieldArr(2) & " / " & tempFieldArr(0)
    End If
End Sub

'Fill Discount column on the basic of distributor
Private Sub cboDistributer_Click()
    Dim discCat As String, discount As Double
    Dim intCount As Integer
   Dim tempFieldArr
    If (cboDistributer.Text <> "") Then
        discCat = Right(cboDistributer.Text, 3)
        If flag = 1 Then ' here if listbox is checked then following code run
        For intCount = 1 To objMuIndnDistributors.Count
            tempFieldArr = objMuIndnDistributors.Item(intCount)
            cboDistributer.AddItem tempFieldArr(0)

   ' here txtDiscount is the textbox name where i want to need that value show on the selection of combobox value
    txtDiscount = objIndianDistributors.Item(getIndex(objIndianDistributors, discCat))(0) 'error line

        ElseIf flag = 0 Then ' here if listbox is unchecked then following code run
        For intCount = 1 To objInternationalDistributors.Count
            tempFieldArr = objInternationalDistributors.Item(intCount)
            cboDistributer.AddItem tempFieldArr(0)
    txtDiscount = objInternationalDistributors.Item(getIndex(objInternationalDistributors, discCat))(0) 'error line

        End If
    End If
End Sub

--> or if u have any code similar to this then plz send me
reply soon that is very urgent

Edited by - vbhem4u on 6/26/2007 4:47:05 AM

Run-time Error '713': Application-defined Or Object Defined Error-Resolved
Hi, I have a vb6 application, access 2002 database, and crystal reports. On my pc with win2000 and on winxp, this application works fine. However when I tried to go on another pc with win2000 that was connected through network neighbourhood to the first pc with win2000, I get this error.

Run-time error '713': Application-defined or object defined error

Any ideas as to what causes this? It only happens when I try to view a report with crystal reports. It works fine on 2 of the 3 computers.



Edited by - leadfinger on 4/16/2004 1:38:54 PM

Run-Time Error '53'
alright i am setuping up a program on another xp machine that does not have vb6.0 on it. i used the p&dw to figure out what files i needed, so that i could use inno. now everything works fine up until i run the program, then i get the run-time error '53' any help would be appreciated. thank you


Run-time Error '430'
i created a setup package with inno setup 3, the setup went well on the development machine (XP) and on another machine with (win 2000), but on win 98 a get the following error message:

run-time error '430':
Class does not support Automation or does not suppert expected interface.

The project uses vb system files, the part of the script looks like this:

; begin VB system files
Source: "c:vbfilesstdole2.tlb"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall sharedfile regtypelib
Source: "c:vbfilesmsvbvm60.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "c:vbfilesoleaut32.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "c:vbfilesolepro32.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "c:vbfilesasycfilt.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall sharedfile
Source: "c:vbfilescomcat.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall sharedfile regserver
; end VB system files

whats wrong??


Run Time Error 429 !!!!!
hi, my "Setup Package" which i created gives the following error after installation (when executing the installed program): "Run time error 429 Active X component can't create object" on a different computer.

here are the component i am using:
1) MSFlex Grid
2) Excel 9
3) Office 9
4) Microsoft scripting library

My system (Package Created Here)
Visual Studio 6 SP5
Windows 2000 SP3
Microsoft Office 2000

System Trying to install
Visual Studio .NET
Windows 2000 SP3
NO MS Office installed (i get the same error even if office is installed)

Any ideas how to fix this problem?

Run Time Error 374
After compiling a project that contains a OCX and a EXE, I packaged them using NSIS2 Installer.

I then sent the package to a friend so he could test it out and he get's the following error:


Failed to activate control 'VB.UserControl'. This control may be incompatible with your application.

The file versions of the EXE and the OCX were the same, which obviously means they are the same version, since I have 'auto increment' checked and they had the same file sizes.

If the files are exactly the same, what could cause this?

Run-time Error 429
Hello all,

I've created a vb application but at the time to run it before it crashes and I get "run time error 429 activex can't create object". I've searched for solutions on the web, i've run dcom98, dao, mdac_type, vb5sp5, regrsv32, regedit, etc, but nothing have worked. Please, help me!

Note: I have developed the application on win2000. It crashes on win98.

Run-time Error

I'm programming with VB6 and SQL server 7.0. When the user are doing enquiry on something in SQL server, run-time error occur:

Run-time error '-2147467259 (80004005)':

Unspecified error

As from microsoft website, it may occurs when 'Creating Fabricated Hierarchical Recordset Fails Using MDAC 2.1SP2'. Actually, I didn't doing that at all.

Does anybody encounter such problem before? Please help.

Reference from microsoft:;en-us;q240341

Run Time Error, ADO??
Hi, Guys,

I have a program that connect to an access database, it worked perfectly on a few machines but on some other machine when I ran it, the following error message appears:

run-time error '430'
Class does not support automation or
does not support expected interface

I then using the package wizard to make an installation program, which itself worked, and I even made the dependecy file as well, thus it should include all the library files it needs. But I still have the same problem. It only appears when a command button is clicked, and that command button is meant to populate some information from the access database.

When I was running the package and deployment wizard, one stage it popped up all the include files, eg,

dao350.dll, it points to a directory, but one item, called

VB6 runtime and OLE automation, while the box is checked, but no reference to where the relevant files are.

Has anyone got any idea why it is doing this and how do I correct this?

Thanks a lot

Run Time Error
Hello, all,

I have a program that uses ADO components to connect to an access database, and I make an exe file from the file menu under VB. Now it runs perfectly on my machine, but when I ran it on the other machine, the following error appears:

run time error '430':
Class does not support Automation or
does not support expected interface

Does anyone know how do I correct this? I am suspecting I have missed some library files, if so, how do I make an exe file that has built-in all the necessary components?

thanks a lot

Copyright 2005-08, All rights reserved