Created
November 10, 2012 12:05
-
-
Save spellancer/4050878 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub zap(oEvent) | |
Dim i as Integer | |
i=0 | |
oForm = oEvent.Source.getModel().getParent() | |
oCon=oForm.ActiveConnection 'объект для доступа к базе данных | |
oStatement=oCon.CreateStatement() 'объект для выполнения запросов | |
sSQLL= "SELECT ""Название"" FROM ""Вид соревнований"" " | |
sSQL= "SELECT ""Место"" , ""Страна"" FROM ""Ведомость"" " | |
oRes=oStatement.executeQuery(sSQLL) | |
oResult=oStatement.executeQuery(sSQL) | |
oStatement.executeQuery(sSQLL) | |
oStatement.executeQuery(sSQL) | |
Do While oRes.next() | |
Do While oResult.next() | |
if (oRes.getstring(1)="Чемпионат Европы") and (oResult.getstring(2)="Россия") and (oResult.getstring(1)<=3) then | |
i=i+1 | |
End If | |
Loop | |
Loop | |
oForm.getByName("output").text=i | |
msgBox("ready") | |
End Sub |
Dim i as Integer
i=0
oForm = oEvent.Source.getModel().getParent()
oCon=oForm.ActiveConnection 'объект для доступа к базе данных
'выполняем запрос
sSQLL= "SELECT ""Название"" FROM ""Вид соревнований"" "
sSQL= "SELECT ""Место"" , ""Страна"" FROM ""Ведомость"" "
oRes=oStatement.executeQuery(sSQLL)
oResult=oStatement1.executeQuery(sSQL)
Do While oResult.next()
Do While oRes.next()
if (oRes.getstring(1)="Чемпионат Европы") and (oResult.getstring(2)="Россия") and (oResult.getstring(1)<=3) then
i=i+1
End If
Loop
Loop
oForm.getByName("output").text=i
msgBox("ready")
End Sub
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dim i as Integer
i=0
oForm = oEvent.Source.getModel().getParent()
oCon=oForm.ActiveConnection 'объект для доступа к базе данных
'выполняем запрос
sSQLL= "SELECT ""Название"" FROM ""Вид соревнований"" "
sSQL= "SELECT ""Место"" , ""Страна"" FROM ""Ведомость"" "
oRes=oStatement.executeQuery(sSQLL)
oResult=oStatement1.executeQuery(sSQL)
Do While oResult.next()
Do While oRes.next()
if (oRes.getstring(1)="Чемпионат Европы") and (oResult.getstring(2)="Россия") and (oResult.getstring(1)<=3) then
i=i+1
End If
Loop
Loop
oForm.getByName("output").text=i
msgBox("ready")
End Sub