Hi ALL,
I wrote a program on C++ using OLE DB to create 3 tables, fill it with data and then create 2 foreign key constraints. Everything works fine except foreign key creation. The program just hangs on calling Execute() method of ICommandText object. Here is SQL-query I use to create foreign key:
ALTER TABLE [city] ADD CONSTRAINT [city_ibfk_1] FOREIGN KEY ([CountryCode]) REFERENCES [country]([Code])
If I run it from sqlcmd.exe it works. What do you recommend to do to find out what's causing this hang? Thank you in advance!