Click here to Skip to main content
15,921,454 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: unknown control (correction) Pin
Rob Graham18-Dec-02 18:37
Rob Graham18-Dec-02 18:37 
GeneralXP IE Icons Set Pin
deanbates17-Dec-02 23:31
deanbates17-Dec-02 23:31 
GeneralRe: XP IE Icons Set Pin
Derek Lakin18-Dec-02 0:25
Derek Lakin18-Dec-02 0:25 
GeneralRe: XP IE Icons Set Pin
Heath Stewart18-Dec-02 1:43
protectorHeath Stewart18-Dec-02 1:43 
GeneralVB.net & outlook Pin
Nick Seng17-Dec-02 21:06
Nick Seng17-Dec-02 21:06 
GeneralRe: VB.net & outlook Pin
Sean Cull1-Jan-03 17:46
Sean Cull1-Jan-03 17:46 
GeneralRe: VB.net & outlook Pin
Nick Seng1-Jan-03 19:43
Nick Seng1-Jan-03 19:43 
GeneralStrange COM error Pin
ProffK17-Dec-02 20:52
ProffK17-Dec-02 20:52 
In an ActiveX dll have an object called Merge, and its method called Import has rudimentary error handling. The basics of Import are shown below. When I call Import from a client, whether I’m connected to the .dll or to the .vbp, with an incorrect database or table name, I get the following error:

Method ‘Import’ of object ‘_Merge’ failed.

Now if I put a break point on my ‘Err.Raise’ line, execution stops there, but when I single step, it returns to the client project with the above error. If, when stopped on that line, I paste it into the immediate window, I get a good error message.

Could this maybe have to do with the fact that the project used to be an ActiveX .exe, and I just recompiled it as a .dll?



Public Function Import(ExecuteDatabase As String, PropagateDatabase As String, TableName As String, FileName As String) As Boolean

Dim strServer As String
Dim strDatabase As String
Dim flgTrans As Boolean

On Error GoTo ErrProc
Import = False

'Connect to configured server and database.
Set objSrv = New SQLServer
strServer = QueryProfile("Database", "Server", "(local)")
strDatabase = QueryProfile("Database", "Database", "cc_online")
objSrv.Connect strServer, "sa", ""
Set objDb = objSrv.Databases(strDatabase)
Set objTable = objDb.Tables(TableName)

...
...
...
Exit Function

ErrProc:
Err.Raise vbObjectError + 2000, "Merge.Import", "Import for table " & TableName & " failed: [" & Err.Description & "]"

End Function

Generalbyref t ype mismatch Pin
ns17-Dec-02 9:09
ns17-Dec-02 9:09 
GeneralRe: byref t ype mismatch Pin
Nick Seng17-Dec-02 17:08
Nick Seng17-Dec-02 17:08 
GeneralRegular Expressions Pin
mikasa17-Dec-02 6:34
mikasa17-Dec-02 6:34 
GeneralEvent Handling in VB.Net WebForms Pin
rohancragg17-Dec-02 4:08
rohancragg17-Dec-02 4:08 
GeneralRe: Event Handling in VB.Net WebForms Pin
Nick Seng17-Dec-02 16:58
Nick Seng17-Dec-02 16:58 
GeneralRe: Event Handling in VB.Net WebForms Pin
rohancragg17-Dec-02 22:46
rohancragg17-Dec-02 22:46 
GeneralRe: Event Handling in VB.Net WebForms Pin
Nick Seng17-Dec-02 23:24
Nick Seng17-Dec-02 23:24 
GeneralWant to do this in VB - involves C pointers... Pin
ns17-Dec-02 1:49
ns17-Dec-02 1:49 
GeneralRe: Want to do this in VB - involves C pointers... Pin
CT CHANG19-Dec-02 16:33
CT CHANG19-Dec-02 16:33 
GeneralVB DLL for C App Pin
NoizeGod16-Dec-02 16:36
NoizeGod16-Dec-02 16:36 
GeneralRe: VB DLL for C App Pin
CT CHANG19-Dec-02 16:29
CT CHANG19-Dec-02 16:29 
GeneralRe: VB DLL for C App Pin
NoizeGod19-Dec-02 17:20
NoizeGod19-Dec-02 17:20 
GeneralRe: VB DLL for C App Pin
CT CHANG19-Dec-02 17:32
CT CHANG19-Dec-02 17:32 
GeneralDo I Need To Close SQL Connection Pin
yccheok15-Dec-02 19:33
yccheok15-Dec-02 19:33 
GeneralRe: Do I Need To Close SQL Connection Pin
Nick Seng17-Dec-02 16:51
Nick Seng17-Dec-02 16:51 
GeneralApplication Path Pin
SuperGeek15-Dec-02 15:21
SuperGeek15-Dec-02 15:21 
GeneralRe: Application Path Pin
Wayne Phipps15-Dec-02 18:48
Wayne Phipps15-Dec-02 18:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.