>mmm I set all the parameters... but it doesn't work.. I changed the values:
>
>> strAttributes = "SERVER=METAFRAME" + Chr(0)
> strAttributes = strAttributes + "DESCRIPTION=Temp DSN " + Chr(0)
> strAttributes = strAttributes + "DSN=DSN_TEMP " + Chr(0)
> strAttributes = strAttributes + "DATABASE=excepciones " + Chr(0)
> strAttributes = strAttributes + "UID=" + Chr(0)
> strAttributes = strAttributes + "PWD=" + Chr(0)
> intRet = SQLConfigDataSource(vbAPINull, ODBC_ADD_DSN, strDriver, strAttributes)
>
>
>But IntRet returns 0 (zero)
>
>Any further help???I see Borislav and Vladimir aleady answered. Your sample code was not using DSNless connections with SQLSTRINGCONNECT() as I advised.
Another (unrelated) issue I see in one of the later examples on this thread is the use of user 'sa' which is the Admin. This is a bad idea. System Admin account should only be used for system administration tasks, not for everyday queries and other database daily operations. That is a security risk. Make your programs aleways use a normal user (restricted account) instead of 'sa'.