Visual basic for Statistica: windows 7: 64bit
i have the following code in Statistica 10....
and i get 10800 type mismatch.. .This code is from Statistica google analytics api (i have cut a large portion of code in order to find what goes wrong).
Note that my password has special character.This is the reason? can you suggest something?
Code:
Dim sGranularityArray(0 To 1) As String
Dim sGooglePass As String
Dim sGoogleMail As String
Dim sSessionToken As String
Dim sProfilesArray() As Variant
Sub Main
If Not AuthenticationDialog() Then Exit Sub
End Sub
Public Function AuthenticationDialog() As Boolean
AuthenticationDialog = True
On Error GoTo ErrAuthenticationDialog
Begin Dialog UserDialog 400,154 ' %GRID:10,7,1,1
GroupBox 10,7,380,147,"Google Authentication Information",.GroupBox1
Text 30,42,90,21,"E-Mail: ",.Text1
TextBox 140,42,210,21,.TextBox1
Text 30,77,90,14,"Password: ",.Text2
TextBox 140,77,210,21,.TextBox2,-1
OKButton 100,119,100,21
CancelButton 220,119,80,21
End Dialog
Dim dlg As UserDialog
If Dialog (dlg) Then
sGoogleMail = dlg.TextBox1
sGooglePass = dlg.TextBox2
If sGoogleMail <> "" And sGooglePass <> "" Then 'Proceed only if user enters both a valid Google eMail address
'and the valid associated Google eMail password
sProfilesArray = GetGAProfiles(sSessionToken, False)
End If
Else
Exit Function
End If
Exit Function
ErrAuthenticationDialog:
AuthenticationDialog = False
MsgBox CStr("Error encountered while proc." & vbCrLf & Err.Number & vbCrLf & Err.Description)
End Function
Public Function GetGAProfiles(sAuthToken As String, Optional bIncludeHeaders As Boolean = False) As Variant
ErrGetGAProfiles:
GetGAProfiles = "Fetching profiles failed"
End Function
Re: Visual basic for Statistica: windows 7: 64bit
As this question isn't related to databases... Thread moved from the 'Database Development' forum to the 'VB6' forum
Re: Visual basic for Statistica: windows 7: 64bit
Quote:
Originally Posted by
si_the_geek
As this question isn't related to databases... Thread moved from the 'Database Development' forum to the 'VB6' forum
sorry and thank you!
i think that has to do with character set... but i dont know what exactly!
Re: Visual basic for Statistica: windows 7: 64bit
To check whether or not an alphanumeric password works if it does then the special characters are the cause if not something else is a foot. Have you tried stepping through the code and checking whether or not variables have the correct values you are expecting when running the code?
Re: Visual basic for Statistica: windows 7: 64bit
The whole api is here if you try by yourself:
"http://sdn.statsoft.com/Portals/0/Examples/GoogleAnalyticsAPIDataQuery.zip"
how i check the correct values? i run it from inside statistica