I was wondering what I am i doing incorrectly in the following code to retrieve a connection string from an .ini file. I keep getting a blank string.
I have my API declared in my global mod.

'Get DB Loaction from INI file

Dim strDBConnect As String
sSection$ = "DB1"
sEntry$ = "DATABASECONN209"
sDefault$ = ""
sRetBuf$ = String$(256, 0) '256 null characters
iLenBuf% = Len(sRetBuf$)
sFileName$ = "c:\program files\conn.ini"
'*
X = GetPrivateProfileString(sSection$, sEntry$, _
sDefault$, sRetBuf$, iLenBuf%, sFileName$)
'*
sValue$ = Left$(sRetBuf$, X)
strDBConnect = sValue$ <<---Blank string, no return of connection string.

==========In my .ini file i have the following
[DB1]
DATABASECONN209="Provider=SQLOLEDB;Data Source=222.34.34.34;Initial Catalog=xxx;User Id=appxxx;Password=@xxxpassword"


Thanks,
Gene