SQLCONNECT() 
Author Message
 SQLCONNECT()

Hi
Ive recently been experimenting with VFP 3 in a client/server environment
against a Linux box running PostgreSQL. Everything works just fine, except
the SQLCONNECT() command. When given in code as shown, the user is asked to
choose the datasource and it works OK, but this will just confuse the end
user, I think.

If I put the datasource in the brackets i.e.

SQLCONNECT('DataSource')

or the database connection i.e.

SQLCONNECT('connection')

then the return value is always -1.

Any answers as to why this happens
--
Stephen Hook



Mon, 29 Mar 2004 20:50:33 GMT  
 SQLCONNECT()
Stephen

If you save the connection information in a database
 open database x
 n = sqlconnect('Connect1')  && or whatver name you saved it to.
In the Connection Designer dialog there are checkboxes for Display ODBC
login prompts. You can also set these properties with
DBSETPROP('connect1','CONNECTION', 'Displogin', n) where n is 1,2 or 3. See
help DBGETPROP. The same setting against an active connection can be set
with SQLSETPROP()
You can also  use STRINGCONNECT() if you don't want a connection stored in a
database.
-Anders


Quote:
> Hi
> Ive recently been experimenting with VFP 3 in a client/server environment
> against a Linux box running PostgreSQL. Everything works just fine, except
> the SQLCONNECT() command. When given in code as shown, the user is asked
to
> choose the datasource and it works OK, but this will just confuse the end
> user, I think.

> If I put the datasource in the brackets i.e.

> SQLCONNECT('DataSource')

> or the database connection i.e.

> SQLCONNECT('connection')

> then the return value is always -1.

> Any answers as to why this happens
> --
> Stephen Hook



Mon, 29 Mar 2004 21:46:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Urgent create connection and sqlconnect

2. SQLconnect

3. fatal error with SQLEXEC() and SQLCONNECT()

4. SQLConnect() bug

5. Fatal error in SQLCONNECT()

6. SQLConnect brings up SQL Server Login Dialog

7. SQLCONNECT

8. SQLCONNECT and the ODBC Pop-Up Login Dialog Box

9. VFP8 SQLConnect() bug

10. SQLCONNECT() Problems

11. SQLCONNECT Problem

12. Fatal Error when connecting to SQL server through SQLCONNECT

 

 
Powered by phpBB® Forum Software