473,395 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

count function

2
Hello!.

can anyone help me?

i have develop a simple program for quering programs and the tables they use.

now, the problem is about how to display the correct total number of tables a specific program is using..

i've used the COUNT FUNCTION but the display is always ZERO..

please check if my codes are correct:
Dim sqlcount
sqlcount = "select count(table_name) from table where prog_name like ' " & txtprogram_name.Text & " %' "
Program.lbltotal.Caption = Val(sqlcount)




please help me with this dilema..

PLEASE..

THANK YOU SO MUCH!.
Feb 7 '07 #1
20 7897
Hello!.

can anyone help me?

i have develop a simple program for quering programs and the tables they use.

now, the problem is about how to display the correct total number of tables a specific program is using..

i've used the COUNT FUNCTION but the display is always ZERO..

please check if my codes are correct:
Dim sqlcount
sqlcount = "select count(table_name) from table where prog_name like ' " & txtprogram_name.Text & " %' "
Program.lbltotal.Caption = Val(sqlcount)




please help me with this dilema..

PLEASE..

THANK YOU SO MUCH!.
First You have to select from the table.
After that you have to write the coding is
Expand|Select|Wrap|Line Numbers
  1. selectedrecord.recordcount(FieldName)
Feb 7 '07 #2
indhu
140 100+
First You have to select from the table.
After that you have to write the coding is
Expand|Select|Wrap|Line Numbers
  1. selectedrecord.recordcount(FieldName)
same problem. but i want a particular column recordcount to be displayed in a textbox.
Feb 7 '07 #3
same problem. but i want a particular column recordcount to be displayed in a textbox.
For that you have to use the following codings
Expand|Select|Wrap|Line Numbers
  1. text1.text=recordset.recordcount("columnName")
Feb 7 '07 #4
indhu
140 100+
For that you have to use the following codings
Expand|Select|Wrap|Line Numbers
  1. text1.text=recordset.recordcount("columnName")
explain me yeah,

once i click my scenecbo this has to come.
i don't know where to place this code. i ve tried in form load its giving error as object required.

noofpanel.text=recordset.recordcount("panel")
Feb 7 '07 #5
explain me yeah,

once i click my scenecbo this has to come.
i don't know where to place this code. i ve tried in form load its giving error as object required.

noofpanel.text=recordset.recordcount("panel")
r u using MSAccess Database?
Feb 7 '07 #6
r u using MSAccess Database?
Then U have to write the follwing code
Expand|Select|Wrap|Line Numbers
  1. Dim rs as New ADODB.Recordset
  2. rs.open"select * from TableName",con
  3. text1.text=rs.Recordcount("ColumnName")
Feb 7 '07 #7
hariharanmca
1,977 1GB
same problem. but i want a particular column recordcount to be displayed in a textbox.
i think column record count and * record count will be same
Feb 7 '07 #8
indhu
140 100+
i think column record count and * record count will be same
vb 6.0 backend is Ms access
Feb 7 '07 #9
hariharanmca
1,977 1GB
vb 6.0 backend is Ms access
Whatever it will return Same value
Feb 7 '07 #10
Killer42
8,435 Expert 8TB
Then U have to write the follwing code
Expand|Select|Wrap|Line Numbers
  1. Dim rs as New ADODB.Recordset
  2. rs.open"select * from TableName",con
  3. text1.text=rs.Recordcount("ColumnName")
Don't forget, there was also a filter on the program name to consider.
Feb 8 '07 #11
Killer42
8,435 Expert 8TB
...
Expand|Select|Wrap|Line Numbers
  1. Dim sqlcount
  2. sqlcount = "select count(table_name) from ..."
  3. Program.lbltotal.Caption = Val(sqlcount)
I'd just like to check - do you understand now, why this code always produces zero?
Feb 8 '07 #12
indhu
140 100+
Whatever it will return Same value
where 2 place the code yeah
Feb 8 '07 #13
where 2 place the code yeah
which control have you used for record count, on that you have to use this code.
Feb 8 '07 #14
indhu
140 100+
which control have you used for record count, on that you have to use this code.
Expand|Select|Wrap|Line Numbers
  1. Private Sub sequcombo_Click()
  2.  
  3. myconnection
  4.  
  5. myquery = sequcombo.Text
  6.  
  7. Call rLOAD
  8.  Do While storyboard!sequence <> myquery
  9.  storyboard.MoveNext
  10.  If storyboard!sequence = myquery Then
  11.  'scenecombo.Text = storyboard!scene
  12.  panel_txt.Text = storyboard!panel
  13.  action_txt.Text = storyboard!Action
  14.  dialogue_txt.Text = storyboard!dialogue
  15.  Picture1.Picture = LoadPicture(storyboard!Filename)
  16.  End If
  17.  Loop
  18.  
  19.  
  20. storyboard.Open "select * from panel", CON
  21. noofpanel.Text = storyboard.RecordCount("panel")  error
  22.  
  23. accdb = "SELECT sequence FROM panel WHERE panelid =  '" & myquery & "' "
  24. 'Load SQL query into a variable
  25.  
  26. Set storyboard = CON.Execute(accdb, adOpenStatic)
  27.  
  28. End Sub
wrong number of argument or invalid property assignment
when i select this combo i want the record count of panel.
Feb 8 '07 #15
Expand|Select|Wrap|Line Numbers
  1. Private Sub sequcombo_Click()
  2.  
  3. myconnection
  4.  
  5. myquery = sequcombo.Text
  6.  
  7. Call rLOAD
  8.  Do While storyboard!sequence <> myquery
  9.  storyboard.MoveNext
  10.  If storyboard!sequence = myquery Then
  11.  'scenecombo.Text = storyboard!scene
  12.  panel_txt.Text = storyboard!panel
  13.  action_txt.Text = storyboard!Action
  14.  dialogue_txt.Text = storyboard!dialogue
  15.  Picture1.Picture = LoadPicture(storyboard!Filename)
  16.  End If
  17.  Loop
  18.  
  19.  
  20. storyboard.Open "select * from panel", CON
  21. noofpanel.Text = storyboard.RecordCount("panel")  error
  22.  
  23. accdb = "SELECT sequence FROM panel WHERE panelid =  '" & myquery & "' "
  24. 'Load SQL query into a variable
  25.  
  26. Set storyboard = CON.Execute(accdb, adOpenStatic)
  27.  
  28. End Sub
wrong number of argument or invalid property assignment
when i select this combo i want the record count of panel.
just you try the following code

Expand|Select|Wrap|Line Numbers
  1. storyboard.Open "select * from panel", CON
  2. noofpanel.Text = RecordCount("panel")
Feb 8 '07 #16
indhu
140 100+
just you try the following code

Expand|Select|Wrap|Line Numbers
  1. storyboard.Open "select * from panel", CON
  2. noofpanel.Text = RecordCount("panel")
Hey sree

where?
Feb 8 '07 #17
Hey sree

where?
have you got it?
Feb 8 '07 #18
indhu
140 100+
have you got it?
No man, its giving error wrong number of argument or invalid property
Feb 9 '07 #19
indhu
140 100+
Whatever it will return Same value
thanks i got the answer.

Expand|Select|Wrap|Line Numbers
  1. noofpanel.Text = RS.RecordCount
Feb 9 '07 #20
hariharanmca
1,977 1GB
thanks i got the answer.

Expand|Select|Wrap|Line Numbers
  1. noofpanel.Text = RS.RecordCount
yha i told, whatever the column record count or Record count will return same
Feb 9 '07 #21

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Scott Castillo | last post by:
The following line prints something: echo $keywords; However, when I then use the count function as follows: $count = count($keywords); echo $count;
1
by: Irfan | last post by:
Hello, I am having some problem with count function. I have a report in which has grouping by a person wise and sub grouping in invoied status e.g.. the output will be Irfan Records (First...
3
by: auron | last post by:
Hi there, I have a really stupid and banal problem with showing the results of a MySQL query in PHP, preciselly with MySQL count() function that gives to a variable in PHP the result. NOTE:...
6
by: Mario Vázquez | last post by:
Hi, I'm tryin in vane to get the number of elements of some type from a XML document using the count() function. I'm not in a XSLT document. I'm just trying to get this from a .NET XmlDocument...
0
by: DAnne | last post by:
I'm trying to do a simple count function in xslt and it's turning out to be extremely painful. I have a report that brings back a set of responses for each question per section in an Audit. I...
0
by: ambika_se | last post by:
hi all I need a help to use count function. I want to make a query in which i want to search for some keyword so the query i made was for $x in doc("file:///C:/Package1.xml")//Package where...
4
by: Brian P | last post by:
I have generated a number of queries successfully. However, I would in my subsequent reports like to get a count of each field which has data in it (that is, "is not null"). But I am confused...
3
by: atiq | last post by:
I am creating a report where i want to display the total number of students found for that query. i use the following but it displays #Error. =Count() Also on the same report, i have another...
1
by: emorrison | last post by:
I hope this isn't too vague, but I have a large XML file and when I try to use a count function in an XSL file to get the number of nodes, it returns 0 for a particular node. I can correctly count...
16
by: lovecreatesbea... | last post by:
It takes mu so time to finish this C source code line count function. What do you think about it? / ******************************************************************************* * Function ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.