ComponentOne still having trouble

Started by bibin98, August 26, 2012, 09:03:14 PM

Previous topic - Next topic

bibin98

OK then, I ZIP my source code to you and send it via FTP, I remove CRXI redistribution in this file to free some space. Thanks

Randem

You are going to get errors as long as you do not follow the directions that we give. You do not understand the process, We do... So if you keep doing it your way problems will persist. We do offer a service to do it for you. That is why we have this service.
 
It's like me fixing my car, I probably can fix it but the knowledge and experience that I would need to gain in order to do it is not worth my time so I pay someone else to do it for me. That is what they do...

bibin98

I have try installing in WinXP, and the result is still the same, error on registering stdole2.tlb. A few years ago, I never get this kind of error

Randem

So Deploy Regtlib.exe on Windows 7 then use it. As far as your other issue; you need to get a better understanding of what a deployment does, what is needed and how it gets there. It's like taking your car to a mechanic and expecting him to fix your car and test drive it with the keys... How much do you really expect if you do not provide all that is needed, No magic happens... ADODB is not SQL Server... It is just a way to connect to different databases if they are present. If SQL Server is not present how do you expect to connect to it?
 
Did you check see if you have VB5 selected instead of VB6? That is what the behavior you speak of suggests. Select VB5 then Select VB6 to make sure.

bibin98

Right now, when I update my application and want to replace old EXE with new EXE in my client comp, appear that error message whereas I using SQL2000 and my client also SQL2000.

bibin98

> As far as stdole.tlb try: regtlib -q stdole2.tlb
I already try that on Win7 but Win7 doesn't have regtlib.exe, so I can't execute that command.

bibin98

Hmmm... Is it OK if I compile using SQL2000 and deploy to target comp which already have SQL2005 installed? Cause what I'm doing is deploying my installer to target comp where SQL Server 2005 is installed but I'm using SQL 2000. Is this because of that? Or maybe I should add module SQL Server 2000 and 20005 in InnoScript?
 
I thought that there would be no problem cause I'm using ADODB 2.7 and already installed using InnoScript.

bibin98

I already delete Search Folder (VB 5 Redist Files and I replace with VB 6 Redist Files) and when I click Create Script, it is back again to VB 5 Redist Files
 
Maybe can be corected in the next version of InnoScript: my Search Folder in InnoScript is added automatically C:Program FilesRandem SystemsInnoScriptInnoScript 11VB 5 Redist Files, not VB 6 Redist Files

Randem

Of course you wont have a problem if you install all the components. That is what your deployment is supposed to do install all the missing components it needs. If you need SQLServer you have to install it otherwise how will it get there? Unless everything you need already exists on the target machine you have to deploy it. If you are using ODBC you have to create the connection also...

bibin98

Yes, I'm using SQL Server 2005 as my database, usually I use SQL Server 2000 and I never get this kind of trouble. I have try install on WinXP where there is already installed SQL 2000 and the problem still the same... Wheww I get more confused... Why is this happening? If I compile and run it on developer comp no error found and my program run well.
 
If I install all (VB6   ComponentOne   SQL Server) in target machine then I don't found this kind of error. I'll try to install MZ-Tools as you recommend.

Randem

BTW: if the error is in the code you posted it is most likely that you need the SQLServer Client deployed. It looks like you are using SQL Server as your database.

Randem

Do a search on the internet for MZTools, it's a VB Add-In that can add line numbers and remove them later. Use that to add the line numbers to your app then add line number reporting to your error routine... IE Err.Number, Err.Description, Err.LineNo

Randem

That is why I suggested using line number in your VB6 code and reporting the line number in your error handling routine... This will give you the exact line number where the error is without guessing. You thought the error was scrrun.dll before so we were just spinning our wheels if the error is in the code you just posted. This is why we need the exact line...

bibin98

Hmmm.... I think that I already answered the question.
 
I already have an ErrorHandling, that error come from procedure ConnectionErr() Class does not support Automation or does not support expected interface. I don't know which line but maybe I just send you my sourcecode :
 
Public Function SetConnection() As Boolean
   On Error GoTo ConnectionErr
   Set cn = New ADODB.Connection
   cn.CommandTimeout = 50
   cn.CursorLocation = adUseClient
10:   cn.Open Provider=SQLOLEDB.1;Password= & PassCn & _
      ;User ID= & UserCn & _
      ;Initial Catalog= & dbName & _
      ;Data Source= & ServerName
   SetConnection = True
   Exit Function
ConnectionErr:
   If (Erl = 10) Then
      frmDBCon.Show vbModal
      frmDBCon.ZOrder 0
   Else
      MsgBox Err.Description, , ConnectionErr()
   End If
End Function

Randem

No, there is no problem and you are not bothering me. It is just we are going in circles... I ask you to do something to help me help you and you do not do it. I cannot help you very well if I do not have the information I ask for.
 
I know your exe is working on your development machine but that is not where you need it to run so that will not help. You need to allow your exe to display messages on the target machine that will tell you in what line the error is in. You can use line numbers and report the exact line number the error happens on. When we find that we can narrow down the exact problem instead of constantly guessing to no avail.
 
I also asked you to make sure that the VB5 folder is not in your search folder... Place the VB5 folder in the Exclude Folder tab so that it will not be searched again.
 
If you follow my instructions directly even if you do not know why, we will have this error resolved very quickly.