When I try to load a VB project, I get the following message:
"Crystal32.ocx Missing"
How can I overcome this problem.
Regards,
SatishOriginally posted by satishbeh
When I try to load a VB project, I get the following message:
"Crystal32.ocx Missing"
How can I overcome this problem.
Regards,
Satish
1. Make sure the Crystal Report Control was installed correctly.
eg. create new vb project add the crystal control, if it's working fine. do the following method
Use Method:
1. Open the project
2. Continue the project with errors
3. After project loaded add the crystal report control in the project (don't save now)
4. close the VB IDE main window [X].
5. This will prompt the changed files, unselect all the files except project .vbp & .vbw, now click yes to save.
open the project now.
yours friendly,
K.Babu
Showing posts with label message. Show all posts
Showing posts with label message. Show all posts
Sunday, March 25, 2012
Thursday, March 22, 2012
Crystal Reports over network
Hi all,
I have received the following error message when tring to load a report which is accessing data over a network from sql server.
The table " could not be found.
Here is the code to try and access a number of reports;
Any help is much appreciated.
Thanks
Private Sub btnRunReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRunReport.Click
Try
MyBase.Cursor = Cursors.WaitCursor
If Me.cboReports.SelectedIndex = 0 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\1.rpt"
ElseIf Me.cboReports.SelectedIndex = 1 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\2.rpt"
ElseIf Me.cboReports.SelectedIndex = 2 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\L3.rpt"
ElseIf Me.cboReports.SelectedIndex = 3 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\4.rpt"
ElseIf Me.cboReports.SelectedIndex = 4 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\5.rpt"
ElseIf Me.cboReports.SelectedIndex = 5 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\6.rpt"
ElseIf Me.cboReports.SelectedIndex = 6 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\7.rpt"
End If
'MsgBox("Please load pre-printed stationary into the printer.")
crvReports.PrintReport()
crvReports.RefreshReport()
MyBase.Cursor = Cursors.Arrow
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End ClassOpen the report and do verify database and make sure it is pointing to the correct databasesql
I have received the following error message when tring to load a report which is accessing data over a network from sql server.
The table " could not be found.
Here is the code to try and access a number of reports;
Any help is much appreciated.
Thanks
Private Sub btnRunReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRunReport.Click
Try
MyBase.Cursor = Cursors.WaitCursor
If Me.cboReports.SelectedIndex = 0 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\1.rpt"
ElseIf Me.cboReports.SelectedIndex = 1 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\2.rpt"
ElseIf Me.cboReports.SelectedIndex = 2 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\L3.rpt"
ElseIf Me.cboReports.SelectedIndex = 3 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\4.rpt"
ElseIf Me.cboReports.SelectedIndex = 4 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\5.rpt"
ElseIf Me.cboReports.SelectedIndex = 5 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\6.rpt"
ElseIf Me.cboReports.SelectedIndex = 6 Then
crvReports.ReportSource = DataAccess.getLevyDirectory & "\7.rpt"
End If
'MsgBox("Please load pre-printed stationary into the printer.")
crvReports.PrintReport()
crvReports.RefreshReport()
MyBase.Cursor = Cursors.Arrow
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End ClassOpen the report and do verify database and make sure it is pointing to the correct databasesql
Sunday, February 19, 2012
Cross-database Ownership Chaining in SQL 2005
This is a multi-part message in MIME format.
--=_NextPart_000_0010_01C5DBA4.D8BB4C00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
Sorry to post in this group. It seems only few people in SQL 2005 = newsgroup now.
I met a problem in SQL SERVER 2005 SEPTEMBER CTP. The option "Cross Database Ownership Chaining" won't work in SQL 2005 Step CTP. But there = is no problem if I call stored procedure to access a table in the sample = database--AdventureWorks. for example:
use msdb
go
drop proc sp_my_test
go
create proc sp_my_test
as
select * from AdventureWorks.Person.Address
--select * from pubs.dbo.test2
go
grant exec on sp_my_test to wdw
go
"wdw" is a normal account with minimal permission. When I called = sp_my_test I got the data return.
But if I try to call a stored procedure to access a table in a new user = database I got error: for example:
use msdb
go
drop proc sp_my_test
go
create proc sp_my_test
as
select * from pubs.dbo.test2
go
grant exec on sp_my_test to wdw
go
"wdw" is the same account with minimal permission. Pubs database and = test2 table are created by sa account.
When I call sp_my_test I met permission denied error:
The error is:
Msg 229, Level 14, State 5, Procedure my_test, Line 4
SELECT permission denied on object 'test2', database 'pubs', schema = 'dbo'.
I changed the server and database option for Cross Database Ownership Chaining. Neither works in my database but it DOES work for = AdventureWorks. Even I disable this option at server and database level it still works for = AdventureWorks database. Can you do this simple test on your SQL 2005 = and post your result?
Thanks for any help!
Bill
--=_NextPart_000_0010_01C5DBA4.D8BB4C00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi,
Sorry to post in this group. It = seems only few people in SQL 2005 newsgroup now.
I met a problem in SQL SERVER 2005 SEPTEMBER CTP. The option "Cross Database Ownership Chaining" won't work in SQL 2005 Step CTP. But = there is no problem if I call stored procedure to access a table in the = sample database--AdventureWorks. for example:
use msdbgodrop proc = sp_my_testgocreate proc sp_my_testasselect * from = AdventureWorks.Person.Address--select * from pubs.dbo.test2gogrant exec on sp_my_test to = wdwgo
"wdw" is a normal account with minimal permission. When I called sp_my_test I got the data return.But if I try to call a stored procedure to access a table in a new user database I got error: for example:use msdbgodrop proc = sp_my_testgocreate proc sp_my_testasselect * from pubs.dbo.test2gogrant exec on sp_my_test to wdwgo
"wdw" is the same account with = minimal permission. Pubs database and test2 table are created by sa account.
When I call sp_my_test I met permission = denied error:
The error is:Msg 229, Level 14, State 5, Procedure = my_test, Line 4SELECT permission denied on object 'test2', database 'pubs', schema = 'dbo'.I changed the server and database option for Cross = Database Ownership Chaining. Neither works in my database but it DOES = work for AdventureWorks. Even I disable this option at server and = database level it still works for AdventureWorks database. Can you do this simple test = on your SQL 2005 and post your result?Thanks for any = help!Bill
--=_NextPart_000_0010_01C5DBA4.D8BB4C00--In order for the cross-database chain to be unbroken for schema owned by
'dbo' users, the databases need to be owned by the same login. The msdb
system database is owned by 'sa' so I would expect your test to work if you
change the owner of your 'pubs' database to 'sa' and turn on the DB_CHAINING
database option:
ALTER AUTHORIZATION ON DATABASE::pubs
TO sa
ALTER DATABASE pubs
SET DB_CHAINING ON
Hope this helps.
Dan Guzman
SQL Server MVP
"Bill Wang" <wdw2130833@.hotmail.com> wrote in message
news:%23BO$hZ82FHA.3136@.TK2MSFTNGP09.phx.gbl...
Hi,
Sorry to post in this group. It seems only few people in SQL 2005 newsgroup
now.
I met a problem in SQL SERVER 2005 SEPTEMBER CTP. The option "Cross
Database Ownership Chaining" won't work in SQL 2005 Step CTP. But there is
no problem if I call stored procedure to access a table in the sample
database--AdventureWorks. for
example:
use msdb
go
drop proc sp_my_test
go
create proc sp_my_test
as
select * from AdventureWorks.Person.Address
--select * from pubs.dbo.test2
go
grant exec on sp_my_test to wdw
go
"wdw" is a normal account with minimal permission. When I called sp_my_test
I got the data return.
But if I try to call a stored procedure to access a table in a new user
database I got error: for
example:
use msdb
go
drop proc sp_my_test
go
create proc sp_my_test
as
select * from pubs.dbo.test2
go
grant exec on sp_my_test to wdw
go
"wdw" is the same account with minimal permission. Pubs database and test2
table are created by sa account.
When I call sp_my_test I met permission denied error:
The error is:
Msg 229, Level 14, State 5, Procedure my_test, Line 4
SELECT permission denied on object 'test2', database 'pubs', schema 'dbo'.
I changed the server and database option for Cross Database Ownership
Chaining. Neither works in my database but it DOES work for AdventureWorks.
Even I
disable this option at server and database level it still works for
AdventureWorks database. Can you do this simple test on your SQL 2005 and
post your result?
Thanks for any help!
Bill
--=_NextPart_000_0010_01C5DBA4.D8BB4C00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
Sorry to post in this group. It seems only few people in SQL 2005 = newsgroup now.
I met a problem in SQL SERVER 2005 SEPTEMBER CTP. The option "Cross Database Ownership Chaining" won't work in SQL 2005 Step CTP. But there = is no problem if I call stored procedure to access a table in the sample = database--AdventureWorks. for example:
use msdb
go
drop proc sp_my_test
go
create proc sp_my_test
as
select * from AdventureWorks.Person.Address
--select * from pubs.dbo.test2
go
grant exec on sp_my_test to wdw
go
"wdw" is a normal account with minimal permission. When I called = sp_my_test I got the data return.
But if I try to call a stored procedure to access a table in a new user = database I got error: for example:
use msdb
go
drop proc sp_my_test
go
create proc sp_my_test
as
select * from pubs.dbo.test2
go
grant exec on sp_my_test to wdw
go
"wdw" is the same account with minimal permission. Pubs database and = test2 table are created by sa account.
When I call sp_my_test I met permission denied error:
The error is:
Msg 229, Level 14, State 5, Procedure my_test, Line 4
SELECT permission denied on object 'test2', database 'pubs', schema = 'dbo'.
I changed the server and database option for Cross Database Ownership Chaining. Neither works in my database but it DOES work for = AdventureWorks. Even I disable this option at server and database level it still works for = AdventureWorks database. Can you do this simple test on your SQL 2005 = and post your result?
Thanks for any help!
Bill
--=_NextPart_000_0010_01C5DBA4.D8BB4C00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi,
Sorry to post in this group. It = seems only few people in SQL 2005 newsgroup now.
I met a problem in SQL SERVER 2005 SEPTEMBER CTP. The option "Cross Database Ownership Chaining" won't work in SQL 2005 Step CTP. But = there is no problem if I call stored procedure to access a table in the = sample database--AdventureWorks. for example:
use msdbgodrop proc = sp_my_testgocreate proc sp_my_testasselect * from = AdventureWorks.Person.Address--select * from pubs.dbo.test2gogrant exec on sp_my_test to = wdwgo
"wdw" is a normal account with minimal permission. When I called sp_my_test I got the data return.But if I try to call a stored procedure to access a table in a new user database I got error: for example:use msdbgodrop proc = sp_my_testgocreate proc sp_my_testasselect * from pubs.dbo.test2gogrant exec on sp_my_test to wdwgo
"wdw" is the same account with = minimal permission. Pubs database and test2 table are created by sa account.
When I call sp_my_test I met permission = denied error:
The error is:Msg 229, Level 14, State 5, Procedure = my_test, Line 4SELECT permission denied on object 'test2', database 'pubs', schema = 'dbo'.I changed the server and database option for Cross = Database Ownership Chaining. Neither works in my database but it DOES = work for AdventureWorks. Even I disable this option at server and = database level it still works for AdventureWorks database. Can you do this simple test = on your SQL 2005 and post your result?Thanks for any = help!Bill
--=_NextPart_000_0010_01C5DBA4.D8BB4C00--In order for the cross-database chain to be unbroken for schema owned by
'dbo' users, the databases need to be owned by the same login. The msdb
system database is owned by 'sa' so I would expect your test to work if you
change the owner of your 'pubs' database to 'sa' and turn on the DB_CHAINING
database option:
ALTER AUTHORIZATION ON DATABASE::pubs
TO sa
ALTER DATABASE pubs
SET DB_CHAINING ON
Hope this helps.
Dan Guzman
SQL Server MVP
"Bill Wang" <wdw2130833@.hotmail.com> wrote in message
news:%23BO$hZ82FHA.3136@.TK2MSFTNGP09.phx.gbl...
Hi,
Sorry to post in this group. It seems only few people in SQL 2005 newsgroup
now.
I met a problem in SQL SERVER 2005 SEPTEMBER CTP. The option "Cross
Database Ownership Chaining" won't work in SQL 2005 Step CTP. But there is
no problem if I call stored procedure to access a table in the sample
database--AdventureWorks. for
example:
use msdb
go
drop proc sp_my_test
go
create proc sp_my_test
as
select * from AdventureWorks.Person.Address
--select * from pubs.dbo.test2
go
grant exec on sp_my_test to wdw
go
"wdw" is a normal account with minimal permission. When I called sp_my_test
I got the data return.
But if I try to call a stored procedure to access a table in a new user
database I got error: for
example:
use msdb
go
drop proc sp_my_test
go
create proc sp_my_test
as
select * from pubs.dbo.test2
go
grant exec on sp_my_test to wdw
go
"wdw" is the same account with minimal permission. Pubs database and test2
table are created by sa account.
When I call sp_my_test I met permission denied error:
The error is:
Msg 229, Level 14, State 5, Procedure my_test, Line 4
SELECT permission denied on object 'test2', database 'pubs', schema 'dbo'.
I changed the server and database option for Cross Database Ownership
Chaining. Neither works in my database but it DOES work for AdventureWorks.
Even I
disable this option at server and database level it still works for
AdventureWorks database. Can you do this simple test on your SQL 2005 and
post your result?
Thanks for any help!
Bill
Labels:
_nextpart_000_0010_01c5dba4,
chaining,
charset,
content-type,
cross-database,
d8bb4c00,
database,
format,
iso-8859-1,
message,
microsoft,
mime,
multi-part,
mysql,
oracle,
ownership,
plain,
server,
sql,
text
Cross-database foreign key references are not supported. Workaround?
When I try to create a cross-database foreign key constraint, I get
"Cross-database foreign key references are not supported"
The cause of the message is, of course, obvious. However, I would still like
to have a constraint based on rows in a table of another database (running
in the same instance).
Is there any way round this, or am I trying to do something unreasonable? If
it's not possible, what would others normally do in this situation?
TIA
Charles
Given that I don't fully understand your scenario, or what set of
requirements is driving the separation of the data in the first place, if
you really want to enforce the relationship, then keep both tables in the
same database, and then create a view in the other database where you think
you need a "copy" of the data.
A
"Charles Law" <blank@.nowhere.com> wrote in message
news:e%235ZS3UUIHA.4280@.TK2MSFTNGP06.phx.gbl...
> When I try to create a cross-database foreign key constraint, I get
> "Cross-database foreign key references are not supported"
> The cause of the message is, of course, obvious. However, I would still
> like to have a constraint based on rows in a table of another database
> (running in the same instance).
> Is there any way round this, or am I trying to do something unreasonable?
> If it's not possible, what would others normally do in this situation?
> TIA
> Charles
>
|||>> Is there any way round this, or am I trying to do something unreasonable?[vbcol=seagreen]
You are not trying to do anything unreasonable. In fact, it is a very common
issue. Since DRI between databases are not supported, people usually use
triggers (a way of procedural referential integrity) to get the job done.
Anith
|||Charles,
By definition, constraints only work within a database. The only mechanism
that I have used for cross-database constraints is triggers. (And only
occasionally.)
RLF
"Charles Law" <blank@.nowhere.com> wrote in message
news:e%235ZS3UUIHA.4280@.TK2MSFTNGP06.phx.gbl...
> When I try to create a cross-database foreign key constraint, I get
> "Cross-database foreign key references are not supported"
> The cause of the message is, of course, obvious. However, I would still
> like to have a constraint based on rows in a table of another database
> (running in the same instance).
> Is there any way round this, or am I trying to do something unreasonable?
> If it's not possible, what would others normally do in this situation?
> TIA
> Charles
>
|||Hi Aaron
Thanks for the quick response. We have two databases: one containing static
(look-up) data, and one containing transient data that gets updated on a
regular basis. There are tables in the latter database that have columns
requiring a corresponding record in a static table (in the other database).
That is why I have been trying to create a cross-database foreign key
constraint. The databases are separate since the look-up data will change
from customer to customer, and it is more convenient to be able to 'plug in'
a new set of static data if it is in a separate database.
Charles
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:epNsk9UUIHA.4440@.TK2MSFTNGP06.phx.gbl...
> Given that I don't fully understand your scenario, or what set of
> requirements is driving the separation of the data in the first place, if
> you really want to enforce the relationship, then keep both tables in the
> same database, and then create a view in the other database where you
> think you need a "copy" of the data.
> A
>
> "Charles Law" <blank@.nowhere.com> wrote in message
> news:e%235ZS3UUIHA.4280@.TK2MSFTNGP06.phx.gbl...
>
|||Hi Russell
Thanks for the reply. I see that Anith is suggesting much the same thing as
well, so with two votes I will look at using triggers.
Cheers.
Charles
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:%23IfhS%23UUIHA.5516@.TK2MSFTNGP02.phx.gbl...
> Charles,
> By definition, constraints only work within a database. The only
> mechanism that I have used for cross-database constraints is triggers.
> (And only occasionally.)
> RLF
> "Charles Law" <blank@.nowhere.com> wrote in message
> news:e%235ZS3UUIHA.4280@.TK2MSFTNGP06.phx.gbl...
>
|||Hi Anith
Thanks for the quick reply. As I replied to Russell, with your and his vote,
it looks like I will be looking at triggers.
Cheers.
Charles
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:uyA15%23UUIHA.5404@.TK2MSFTNGP03.phx.gbl...
> You are not trying to do anything unreasonable. In fact, it is a very
> common issue. Since DRI between databases are not supported, people
> usually use triggers (a way of procedural referential integrity) to get
> the job done.
> --
> Anith
>
|||On Jan 7, 10:53 am, "Charles Law" <bl...@.nowhere.com> wrote:
> When I try to create a cross-database foreign key constraint, I get
> "Cross-database foreign key references are not supported"
> The cause of the message is, of course, obvious. However, I would still like
> to have a constraint based on rows in a table of another database (running
> in the same instance).
> Is there any way round this, or am I trying to do something unreasonable? If
> it's not possible, what would others normally do in this situation?
> TIA
> Charles
Charles,
I hope you realize that whatever solution you choose, it might not be
fully watertight. If you ever need to restore one of your databases
from a backup, that may violate your integrity - I don't know a fully
safe solution. Also be aware that sometimes trigger do not fire.
|||Hi
There is also the option of using a function in the constraint.
John
"Charles Law" wrote:
> Hi Anith
> Thanks for the quick reply. As I replied to Russell, with your and his vote,
> it looks like I will be looking at triggers.
> Cheers.
> Charles
>
> "Anith Sen" <anith@.bizdatasolutions.com> wrote in message
> news:uyA15%23UUIHA.5404@.TK2MSFTNGP03.phx.gbl...
>
>
|||Hi John
Any idea how performance compares between use of FK constraint (if it were
available), trigger and function?
Charles
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:7243FE54-4405-4EC3-80A6-F9ABFB98117E@.microsoft.com...[vbcol=seagreen]
> Hi
> There is also the option of using a function in the constraint.
> John
> "Charles Law" wrote:
"Cross-database foreign key references are not supported"
The cause of the message is, of course, obvious. However, I would still like
to have a constraint based on rows in a table of another database (running
in the same instance).
Is there any way round this, or am I trying to do something unreasonable? If
it's not possible, what would others normally do in this situation?
TIA
Charles
Given that I don't fully understand your scenario, or what set of
requirements is driving the separation of the data in the first place, if
you really want to enforce the relationship, then keep both tables in the
same database, and then create a view in the other database where you think
you need a "copy" of the data.
A
"Charles Law" <blank@.nowhere.com> wrote in message
news:e%235ZS3UUIHA.4280@.TK2MSFTNGP06.phx.gbl...
> When I try to create a cross-database foreign key constraint, I get
> "Cross-database foreign key references are not supported"
> The cause of the message is, of course, obvious. However, I would still
> like to have a constraint based on rows in a table of another database
> (running in the same instance).
> Is there any way round this, or am I trying to do something unreasonable?
> If it's not possible, what would others normally do in this situation?
> TIA
> Charles
>
|||>> Is there any way round this, or am I trying to do something unreasonable?[vbcol=seagreen]
You are not trying to do anything unreasonable. In fact, it is a very common
issue. Since DRI between databases are not supported, people usually use
triggers (a way of procedural referential integrity) to get the job done.
Anith
|||Charles,
By definition, constraints only work within a database. The only mechanism
that I have used for cross-database constraints is triggers. (And only
occasionally.)
RLF
"Charles Law" <blank@.nowhere.com> wrote in message
news:e%235ZS3UUIHA.4280@.TK2MSFTNGP06.phx.gbl...
> When I try to create a cross-database foreign key constraint, I get
> "Cross-database foreign key references are not supported"
> The cause of the message is, of course, obvious. However, I would still
> like to have a constraint based on rows in a table of another database
> (running in the same instance).
> Is there any way round this, or am I trying to do something unreasonable?
> If it's not possible, what would others normally do in this situation?
> TIA
> Charles
>
|||Hi Aaron
Thanks for the quick response. We have two databases: one containing static
(look-up) data, and one containing transient data that gets updated on a
regular basis. There are tables in the latter database that have columns
requiring a corresponding record in a static table (in the other database).
That is why I have been trying to create a cross-database foreign key
constraint. The databases are separate since the look-up data will change
from customer to customer, and it is more convenient to be able to 'plug in'
a new set of static data if it is in a separate database.
Charles
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:epNsk9UUIHA.4440@.TK2MSFTNGP06.phx.gbl...
> Given that I don't fully understand your scenario, or what set of
> requirements is driving the separation of the data in the first place, if
> you really want to enforce the relationship, then keep both tables in the
> same database, and then create a view in the other database where you
> think you need a "copy" of the data.
> A
>
> "Charles Law" <blank@.nowhere.com> wrote in message
> news:e%235ZS3UUIHA.4280@.TK2MSFTNGP06.phx.gbl...
>
|||Hi Russell
Thanks for the reply. I see that Anith is suggesting much the same thing as
well, so with two votes I will look at using triggers.
Cheers.
Charles
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:%23IfhS%23UUIHA.5516@.TK2MSFTNGP02.phx.gbl...
> Charles,
> By definition, constraints only work within a database. The only
> mechanism that I have used for cross-database constraints is triggers.
> (And only occasionally.)
> RLF
> "Charles Law" <blank@.nowhere.com> wrote in message
> news:e%235ZS3UUIHA.4280@.TK2MSFTNGP06.phx.gbl...
>
|||Hi Anith
Thanks for the quick reply. As I replied to Russell, with your and his vote,
it looks like I will be looking at triggers.
Cheers.
Charles
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:uyA15%23UUIHA.5404@.TK2MSFTNGP03.phx.gbl...
> You are not trying to do anything unreasonable. In fact, it is a very
> common issue. Since DRI between databases are not supported, people
> usually use triggers (a way of procedural referential integrity) to get
> the job done.
> --
> Anith
>
|||On Jan 7, 10:53 am, "Charles Law" <bl...@.nowhere.com> wrote:
> When I try to create a cross-database foreign key constraint, I get
> "Cross-database foreign key references are not supported"
> The cause of the message is, of course, obvious. However, I would still like
> to have a constraint based on rows in a table of another database (running
> in the same instance).
> Is there any way round this, or am I trying to do something unreasonable? If
> it's not possible, what would others normally do in this situation?
> TIA
> Charles
Charles,
I hope you realize that whatever solution you choose, it might not be
fully watertight. If you ever need to restore one of your databases
from a backup, that may violate your integrity - I don't know a fully
safe solution. Also be aware that sometimes trigger do not fire.
|||Hi
There is also the option of using a function in the constraint.
John
"Charles Law" wrote:
> Hi Anith
> Thanks for the quick reply. As I replied to Russell, with your and his vote,
> it looks like I will be looking at triggers.
> Cheers.
> Charles
>
> "Anith Sen" <anith@.bizdatasolutions.com> wrote in message
> news:uyA15%23UUIHA.5404@.TK2MSFTNGP03.phx.gbl...
>
>
|||Hi John
Any idea how performance compares between use of FK constraint (if it were
available), trigger and function?
Charles
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:7243FE54-4405-4EC3-80A6-F9ABFB98117E@.microsoft.com...[vbcol=seagreen]
> Hi
> There is also the option of using a function in the constraint.
> John
> "Charles Law" wrote:
Labels:
cause,
constraint,
create,
cross-database,
database,
foreign,
key,
message,
microsoft,
mysql,
oracle,
references,
server,
sql,
workaround
Subscribe to:
Posts (Atom)