Pablo,
What happens if you omit the call to SetSessionInfo?
Also, what value does SetLogOnInfo return to you? I've found that when it returns NULL it means that the logon info was properly set. When it returns other value (I believe .F.) then it means that something went wrong.
Keep in mind that if you have subreports in your Crystal Report you need to process those separately!.
>Hi everybody!
>
>I’m working with Crystal Reports 9 and need to change programmatically the property
SQLQueryString in a report, I’m using this code ...
>
>
>thisform.oReporte.Database.SetDataSource( “MyDataBase” )
>thisform.oReporte.Database.Tables( 1 ).SetLogOnInfo( "MyDSNDriver", "MyDataBase", "user", "password" )
>thisform.oReporte.Database.Tables( 1 ).SetSessionInfo( "user", "password" )
>thisform.oReporte.SQLQueryString = "Select * From MyTable"
>
>
>The value is not updated, but there’s not any error message neither ... any ideas
>
>Thanks in advance,
Hector Correa