on 11-28-2005 12:43 PM
Hi
I made this code :
Dim strstringaconnessione As String
Dim cnnADO As New ADODB.Connection
Dim rstProva As New ADODB.Recordset
Dim cmdProva As New ADODB.Command
strstringaconnessione = "Data Source = SAP BW Test (TBC)"
strstringaconnessione = strstringaconnessione & ";User Id = [user]"
strstringaconnessione = strstringaconnessione & ";Password = [psw];"
'strstringaconnessione = strstringaconnessione & "Provider = " & MDrmSAP
strstringaconnessione = strstringaconnessione & "SFC_CLIENT=150;SFC_LANGUAGE=IT"
'
' apro il database
'
If cnnADO.State = adStateClosed Then
cnnADO.Provider = "MDrmSAP"
Call cnnADO.Open(strstringaconnessione)
End If
ADO_ApriConnessione = cnnADO.State
rstProva.Open "SELECT * FROM CE_FXX_PER_DIREZIONE", cnnADO, adOpenForwardOnly, adLockReadOnly
Do Until rstProva.EOF
rstProva.MoveNext
Loop
cnnADO.Close
ADO_ApriConnessione = cnnADO.State
Exit Sub
But when I try to open the recordset I have an error, because the program ask me the variables .
How can I write the variables before opening the query?
Please help me
I think that the only way i sto set valuse as default; when you enter variable value theres a botton after the field; press it and chose personalize variable value.
After that it will never ask you for the variable and if you want to change the value from bex you have to choose Modify query Change variable values.
Hope it helps.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found the solution in this way:
strMDX = "SELECT"
strMDX = strMDX & " [Measures].MEMBERS ON ROWS"
strMDX = strMDX & " ,NON EMPTY [34293QW91GGT5D4Q6BR94DW76].MEMBERS ON COLUMNS"
strMDX = strMDX & " FROM [0PCA_C01/CE_FXX_PER_DIREZIONE]"
strMDX = strMDX & " SAP VARIABLES"
strMDX = strMDX & " [0N_PCTR] INCLUDING [0PROFIT_CTR CGT FILIALI].[CGT AREZZO 0HIER_NODE]"
strMDX = strMDX & " [Z_PERIOD] INCLUDING [0FISCPER].[K42005006]"
strMDX = strMDX & " [VPIAN] INCLUDING [0VERSION].[001]"
tks a lot
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.