DEExtDesigner 
Author Message
 DEExtDesigner

What I doing wrong in this cod?

Public DE As DEExtDesigner

Private Sub Command1_Click()

   Set DE = New DEExtDesigner

End Sub

After click event I get the message:

ActiveX component can't create object

Note: In project/references I add "Microsoft data environment extensibility
objects 1.0"

Thank You!



Sun, 18 Apr 2004 18:26:49 GMT  
 DEExtDesigner
I don't believe this object is creatable; I have researched the issue and
see that other customers have confirmed this. If you let me know what
you're attempting to do, perhaps I can recommend another technique.

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.



Mon, 19 Apr 2004 02:25:08 GMT  
 DEExtDesigner
Hello!

I attempt to get some data from some database using data link window form
making connections and command properties window for making query. I find
way for call data link window,

Option Explicit
Public x As New MSDASC.DataLinks

Private Sub Command1_Click()

    Set y = x.PromptNew

    If y Is Nothing Then
        MsgBox "You clicked cancel!"
    Else
        MsgBox "Connection string: " & y.ConnectionString

    End If

End Sub

but I don't now how can I add command to this connection from my code. From
this reason I try to make DataEnvironment after that connections and after
that command with DEExtDesigner.
On
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vb98...
bobjdeextdesigner_x.asp
I find next example bat also it's don't work.

Public VBInstance As VBIDE.VBE
Private mblnDEalreadyCreated As Boolean
Private WithEvents deX As DEExtDesigner

Private Sub AddDEextensiblity()
   ' If a DE has been created, exit the sub.
   If mblnDEalreadyCreated Then
      MsgBox "already created"
      Exit Sub
   End If
   ' Use the AddCustom method to add a new
   ' DataEnvironment object to the project.
   ' Then set the DEExtDesigner object variable (deX)
   ' to the new object.
   Dim vbcTempComponent As VBComponent
   Set vbcTempComponent = VBInstance.VBProjects(1). _
   VBComponents.AddCustom("DEDesigner.DataEnvironment")
   ' Set various properties of the designer. Use the Version property
   ' to display the designer version (as shown) in a label control. Or
   ' use it to compare versions.
   Set deX = vbcTempComponent.Designer
   With deX
       lblInfo = "Data Environment " & .Version
      .DisableWarnings = False
      .PromptBeforeExecute = False
      .PromptDelete = True
      .ShowPropertiesAfterCreate = False
      .ShowStatusBar = True
      .ShowSystemObjects = True
   End With
   ' Very important: set the object variable for the DEExtDesigner
   ' to the Designer property of the VBComponent object.
   mblnDEalreadyCreated = True
End Sub

What can I do now if microsoft example don't work?

Thank You on your patience!

Quote:
----- Original Message -----

Newsgroups: microsoft.public.vb.enterprise
Sent: Wednesday, October 31, 2001 19:25
Subject: RE: DEExtDesigner

> I don't believe this object is creatable; I have researched the issue and
> see that other customers have confirmed this. If you let me know what
> you're attempting to do, perhaps I can recommend another technique.

> Steven Bras, MCSD
> Microsoft Developer Support/Visual Basic WebData

> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
> reserved.



Mon, 19 Apr 2004 20:47:00 GMT  
 DEExtDesigner
Hello!

I attempt to get some data from some database using data link window form
making connections and command properties window for making query. I find
way for call data link window,

Option Explicit
Public x As New MSDASC.DataLinks

Private Sub Command1_Click()

    Set y = x.PromptNew

    If y Is Nothing Then
        MsgBox "You clicked cancel!"
    Else
        MsgBox "Connection string: " & y.ConnectionString

    End If

End Sub

but I don't now how can I add command to this connection from my code. From
this reason I try to make DataEnvironment after that connections and after
that command with DEExtDesigner.
On
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vb98...
bobjdeextdesigner_x.asp
I find next example bat also it's don't work.

Public VBInstance As VBIDE.VBE
Private mblnDEalreadyCreated As Boolean
Private WithEvents deX As DEExtDesigner

Private Sub AddDEextensiblity()
   ' If a DE has been created, exit the sub.
   If mblnDEalreadyCreated Then
      MsgBox "already created"
      Exit Sub
   End If
   ' Use the AddCustom method to add a new
   ' DataEnvironment object to the project.
   ' Then set the DEExtDesigner object variable (deX)
   ' to the new object.
   Dim vbcTempComponent As VBComponent
   Set vbcTempComponent = VBInstance.VBProjects(1). _
   VBComponents.AddCustom("DEDesigner.DataEnvironment")
   ' Set various properties of the designer. Use the Version property
   ' to display the designer version (as shown) in a label control. Or
   ' use it to compare versions.
   Set deX = vbcTempComponent.Designer
   With deX
       lblInfo = "Data Environment " & .Version
      .DisableWarnings = False
      .PromptBeforeExecute = False
      .PromptDelete = True
      .ShowPropertiesAfterCreate = False
      .ShowStatusBar = True
      .ShowSystemObjects = True
   End With
   ' Very important: set the object variable for the DEExtDesigner
   ' to the Designer property of the VBComponent object.
   mblnDEalreadyCreated = True
End Sub

What can I do now if microsoft example don't work?

Thank You on your patience!



Mon, 19 Apr 2004 21:31:03 GMT  
 DEExtDesigner

Aleksandar,

I just tested the MSDN code sample in a new Add-in Project, and it
successfully adds a new Data Environment with Connection1 to my empty
Standard EXE test project.

I then added this code at the end of the subroutine, and it successfully
adds a new Command object under Connection1:

   Dim cmd As DEDesignerExtensibility.DECommand
   Set cmd = deX.DECommands.Add("Command1")
   With cmd
    .ConnectionName = "connection1"
    .CommandType = adCmdText
    .CommandText = "select * from customers"
    End With

(After this a message appears that I have not specified the connection
string, but you have already learned how to add that functionality.)

This posting is provided AS IS with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.



Tue, 20 Apr 2004 05:50:24 GMT  
 
 [ 5 post ] 

 Relevant Pages 
 

 
Powered by phpBB® Forum Software