hconn = SqlStringconnect([filedsn=c:\temp\sqlfiledsn.dsn;UID=myid;PWD=mypass' )Also, AERROR() will give detailed info about ODBC error.
>PUBLIC dsn, hconn >dsn = 'c:\temp\sqlfiledsn.dsn' - This is the File DSN I created > >hconn = SQLCONNECT(dsn) > >IF hconn <= 0 > = MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error') >ELSE > = MESSAGEBOX('Connection made', 48, 'SQL Connect Message) > = SQLDISCONNECT(gnConnHandle) >ENDIF>Using this code, I can never connect. I know the File DSN I created is valid, but it's actually referencing it which is giving me a hard time. I wouldn't think this would be so tough, arrggghhh !!