Skip to main content

Hi,

Just wanted to clarify something. I have, $SQL( INIT) statement in my first prog with no parameters. I immediately issue an EXEC SQL select... from table.... Works fine even though i never specify db name or user/pw. Is this because I only have a single odbc source defined on my pc?

Thanks, Linden 

Hi,

Just wanted to clarify something. I have, $SQL( INIT) statement in my first prog with no parameters. I immediately issue an EXEC SQL select... from table.... Works fine even though i never specify db name or user/pw. Is this because I only have a single odbc source defined on my pc?

Thanks, Linden 

We do not recommend using the INIT option for connecting. That has been deprecated as it really is not secure. You should really embed an EXEC SQL CONNECT statement into your code.

If you do use INIT then you should also use the DB and PASS directives as well to tell it which connection to use. If you are not using these then I am really not sure what it is using for a connection name.


Hi,

Just wanted to clarify something. I have, $SQL( INIT) statement in my first prog with no parameters. I immediately issue an EXEC SQL select... from table.... Works fine even though i never specify db name or user/pw. Is this because I only have a single odbc source defined on my pc?

Thanks, Linden 

Ok thanks Chris, I'll switch to specific connections.  


Hi,

Just wanted to clarify something. I have, $SQL( INIT) statement in my first prog with no parameters. I immediately issue an EXEC SQL select... from table.... Works fine even though i never specify db name or user/pw. Is this because I only have a single odbc source defined on my pc?

Thanks, Linden 

Ok thanks Chris, I'll switch to specific connections.  


Hi,

Just wanted to clarify something. I have, $SQL( INIT) statement in my first prog with no parameters. I immediately issue an EXEC SQL select... from table.... Works fine even though i never specify db name or user/pw. Is this because I only have a single odbc source defined on my pc?

Thanks, Linden 

Ok thanks Chris, I'll switch to specific connections.