-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Understanding 'open environment' and 'get db object' invocation order #150
Comments
Hi, in that case yes - second case is more correct, thanks for pointing this out. |
Just to be clear. Open environment first is more correct, is it? sp_open(env);
void *db = sp_getobject(env, "db.test"); About sp_open(env);
sp_setstring(env, "db", "test", 0);
void *db = sp_getobject(env, "db.test");
sp_open(db); // Do this because 'db' string was set after sp_open(env) |
Yes to both questions :) |
Thank you for the explanations! =) |
Hello guys!
Question
Does the order of invocation the
sp_open(env)
andsp_getobject(env, "db.test")
statements matter?I tried both cases and it worked in each case. So obviously it doesn't but I tried trivial ones. So is there any case when it does matter?
Why am I concerned
CRUD example says:
Common Workflow example says:
Thank you!
The text was updated successfully, but these errors were encountered: