HEMANT !!!!!!Standerd deviation of database column using vb

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adnanahmed714
    New Member
    • Aug 2006
    • 20

    HEMANT !!!!!!Standerd deviation of database column using vb

    hi hemant
    i got the sum of the column but not getting STDDEV and VARIANCE function result.it gives error on the function STDDEV. here is my code
    =============== =============== =============== =========
    Option Explicit
    Dim cnn As ADODB.Connectio n
    Dim rst As ADODB.Recordset

    Dim strCnn As String
    Dim lngCount As Long
    Dim strID As String
    Dim sSQL As String
    Dim booRecordAdded As Boolean
    Private Sub Form_Load()
    ' Open a connection.
    Set cnn = New ADODB.Connectio n
    strCnn = "Provider=Micro soft.Jet.OLEDB. 4.0;Data source=D:\AA\A. mdb;Persist Security Info=False"
    cnn.Open strCnn

    Set rst = New ADODB.Recordset
    rst.CursorType = adOpenKeyset
    rst.LockType = adLockOptimisti c


    sSQL = "select STDDEV(WindSpee d) as lngCount from Weather "
    rst.Open sSQL, cnn
    Text1.Text = rst.Fields!lngC ount
    End Sub
  • Hemant Pathak
    Recognized Expert New Member
    • Jul 2006
    • 92

    #2
    Hi............. ..

    STDDEV is unreconiz function
    it is STDEV and syntex is use MS-ACCESS HELP

    STDEV
    Estimates standard deviation based on a sample (ignores logical values and text in the sample).

    Syntax

    STDEV(number1,n umber2,...)

    Number1 Number1, Number2, ... are 1 to 30 numbers that correspond to a sample of a population and can be numbers or references that contain numbers.
    STDEVP
    Calculates standard deviation based on the entire population given as arguments (ignores logical values and text).

    Syntax

    STDEVP(number1, number2,...)

    Number1 Number1, Number2, ... are 1 to 30 numbers that correspond to a population and can be numbers or references that contain numbers.
    STDEVPA
    Calculates standard deviation based on an entire population, including logical values and text. Text and the logical value FALSE have the value 0 (zero); the logical value TRUE has the value 1.

    Syntax

    STDEVPA(value1, value2,...)

    Value1 Value1, Value2, ... are 1 to 30 values that correspond to a population and can be values or references that contain values.

    STDEVA
    Estimates standard deviation based on a sample, including logical values and text. Text and the logical value FALSE have the value 0 (zero); the logical value TRUE has the value 1.

    Syntax

    STDEVA(value1,v alue2,...)

    Value1 Value1, Value2, ... are 1 to 30 values that correspond to a sample of a population and can be values or references to values.

    Comment

    • adnanahmed714
      New Member
      • Aug 2006
      • 20

      #3
      Hi
      i want to calculate the STDEV of last 50 values added in the database ,what u suggest i need to do.

      NOTE! After 1 second one entry is adding in the database database

      PLZZZZZZZZZZZZZ ZZZZZZZZZ reply soon

      Comment

      Working...