 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Wed Dec 17, 2003 11:45 am Post subject: SQL DMO problem |
|
|
When I execute this code on a machine named PC1 it works with out problem:
var
SS: SqlServer;
begin
SS := CoSqlServer.Create; // --> works without problem
..
..
end;
However, when I try to create remote object on PC1, an exception is raised:
(the following code is executed on PC2)
var
SS: SqlServer;
begin
SS := CoSqlServer.CreateRemote('PC1'); // --> raises an exception "Class
not registered"
..
..
end;
DCOM is configured properly and tested with sample application
executed onb PC2, which creates WordApplication object on PC1.
I don't know what I'm missing.
Is it possible to create sqldmo object SqlServer on a remote machine ?
Thanks,
|
|
| Back to top |
|
 |
Guest
|
Posted: Wed Dec 17, 2003 2:29 pm Post subject: Re: SQL DMO problem |
|
|
I solved the "class not registered" problem with hosting the objects from
sqldmo.dll in a
COM+ application server via Component services, but now the other problem
appears.
In fact, I'm trying to genere sqlscripts using sqldmo.
(the following code works normally when I'm creating objects locally
(.Create) and raises an EOleExceptionError
when I'm creating objects with CreateRemote)
procedure ...
var
SS: SqlServer;
Db: DataBase;
T: Transfer;
begin
SS := CoSqlServer.CreateRemote(EditServer.Text);
Db := CoDatabase.CreateRemote(EditServer.Text);
T := CoTransfer.CreateRemote(EditServer.Text);
SS.LoginSecure := CBTrusted.Checked;
SS.Connect(EditServer.Text, EditUserName.Text, EditPassword.Text); // this
line succesfully connects to sql server
Db := SS.Databases.Item(EditDB.Text, SS);
Caption := IntToStr(Db.size); // this line passes - gives correct value
Db.ScriptTransfer(T, 2, EditFileName.Text); // this line raises an
exception !!!!!!
end;
The last line raises the following error; [SQLDMO] The passed object is not
a SQLDMO object.
Any help?
Thanks
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|