Runtime error 216?

When I create a database using Apollo command CreateExec, the program is
crashed by "Access violation at address 10006306 in module 'sde32.dll' write
of address '0000096A'" and "Runtime error 216 at 00002E18" messages. But if
I take this procedure to a new project, it works fine. Anyone know what is
the problem?