Alıntı:
onurkaya tarafından gönderilen mesaj:
dediğin gibi yaptım ama şu hatayı verdi:
Microsoft VBScript çalışma hatası (0x800A01B6)
Nesne bu özellik veya yöntemi desteklemiyor: 'Execute'
"SNotRS" recordsetini tanımlıyoruz ama "se" nedir ve ne işe yarayacak?
hiç bir yerle bağlantı kuramadım... 
|
SNotRS'nin recordset değil connection olması ve open edilmesi gerekmektedir. dolayısıyla se'de connection'dan execute edilen bir recordset olacaktır.
Kod:
<%
Dim SNotRS, SNotSQL, SNotToplam
Set SNotRS = server.CreateObject("ADODB.Connection")
SNotRS.Open DizaynWebBaglanti
Set se = SNotRS.Execute("SELECT SUM(not) FROM notlar")
%>
<%=se(0)%>
bir başka yazım ise;
Kod:
<%
Dim SNotRS, SNotSQL, SNotToplam
Set SNotRS = server.CreateObject("ADODB.Connection")
SNotRS.Open DizaynWebBaglanti
%>
<%=SNotRS.Execute("SELECT SUM(not) FROM notlar")(0)%>