|
thanks for your kind post, but your solution isn't one good for me because the years appear in row not in column
3545,3 2007 client_1 1
433,33 2008 client_1 1
77756,1 2009 client_1 1
3423,7 2010 client_1 1
1234,44 2011 client_1 1
I think that the only solution is to use TRANSFORM.....PIVOT
Right? Or there is another solution?
Please let me know if is true.
Thanks a lot for your support!
|
|
|
|
|
The format you have provided for output, it seems that you want to use it in chart control? Is it right?
|
|
|
|
|
No, it's only interogate for a datagrid. I want to do this for a rapid information of sales agents about history of customer. It's a small office application...
|
|
|
|
|
LUC,
I think that the solution is:
TRANSFORM Sum(Vanzari.Valoare) AS SumOfValoare
SELECT Vanzari.Client
FROM Vanzari
GROUP BY Vanzari.Client
PIVOT Month([Data]);
and work good, this I have a column for each year and sum of invoice/year/client
|
|
|
|
|
OFFFF!!!
It didn't work.
TRANSFORM is not recognize in design mod, using Query Wizard of TableAdapter.
|
|
|
|
|
Dim op As String
Option Explicit
Dim i As Integer
Dim exp1 As Double
Dim exp2 As Double
Dim Result As Double
Dim count1 As Integer
Dim scitype As String
Private X As Double
Dim mem As Variant
Private Sub Command1_Click(Index As Integer)
If count1 = 0 Then
Text1.Text = " "
MsgBox ("Calculator is not on")
End If
If count1 = 1 Then
Text1.Text = " "
count1 = count1 + 1
End If
If count1 > 1 Then
Text1.Text = Text1.Text & command1(Index).Caption
End If
End Sub
Private Sub Command10_Click()
Text1.Text = mem
End Sub
Private Sub Command2_Click()
Text1.Text = -Val(Text1.Text)
End Sub
Private Sub Command3_Click()
If count1 > 0 Then
exp2 = Val(Text1.Text)
Select Case (op)
Case "+"
Result = exp1 + exp2
Text1.Text = Result
count1 = 0
Case "-"
Result = exp1 - exp2
Text1.Text = Result
count1 = 0
Case "*"
Result = exp1 * exp2
Text1.Text = Result
count1 = 0
Case "/"
Result = exp1 / exp2
Text1.Text = Result
count1 = 0
Case "%"
Result = (exp1 / 100) * exp2
Text1.Text = Result
count1 = 0
End Select
End If
End Sub
Private Sub Command4_Click(Index As Integer)
Result = exp1
exp1 = Result + Val(Text1.Text)
Text1.Text = " "
op = Command4(Index).Caption
End Sub
Private Sub Command5_Click()
Result = 0
exp1 = 0
exp2 = 0
Text1.Text = " "
count1 = 1
End Sub
Private Sub Command6_Click()
count1 = 0
Text1.Text = ""
End Sub
Private Sub Command7_Click()
Result = 0
exp1 = 0
exp2 = 0
count1 = 1
Text1.Text = "0"
End Sub
Private Sub UpdateLog()
Trim (Form1.Text1.Text)
End Sub
Private Sub Command8_Click(Index As Integer)
scitype = Command8(Index).Caption
Select Case (scitype)
Case "sin"
Text1.Text = (Text1.Text * 3.14) / 180
Text1.Text = Math.Sin(Val(Text1.Text))
count1 = 0
Case "cos"
Text1.Text = (Text1.Text * 3.14) / 180
Text1.Text = Math.Cos(Val(Text1.Text))
count1 = 0
Case "tan"
Text1.Text = (Text1.Text * 3.14) / 180
Text1.Text = Math.Tan(Val(Text1.Text))
count1 = 0
Case "sqrt"
Text1.Text = Math.Sqr(Val(Text1.Text))
count1 = 0
Case "abs"
Text1.Text = Math.Abs(Val(Text1.Text))
count1 = 0
Case "rnd"
Text1.Text = Math.Rnd(Val(Text1.Text))
count1 = 0
Case "log"
Text1.Text = Math.Log(Val(Text1.Text))
count1 = 0
Case "Atn"
Text1.Text = Math.Log(Val(Text1.Text))
count1 = 0
End Select
End Sub
Private Sub Command9_Click()
mem = Text1.Text
End Sub
|
|
|
|
|
And the error is where? and what?
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
SIR i don't know how to fix it in command botton please help me u have facebook? please add me michaelgsm22@yahoo.com I w8 your response
modified on Monday, August 22, 2011 10:23 AM
|
|
|
|
|
No need to discuss this on Facebook, since you probably have realised, that this is a - as you also might have guessed from the page menu already - "discussion forum". Isn't that nice? So no need to change to a stupid platform for which you have to do a new registration in case you're not a member yet.
By the way, it's "I wait", not "I w8". Don't use textspeak, you are not five years old (probably).
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
So, Can you tell us from where you copy this code?
|
|
|
|
|
in my proff. this my project in 1st sem sir help me!
|
|
|
|
|
Add all the command buttons and text boxes. For Command1 only (as the code tell us), copy it & paste it to form to create an array of command. I don't know how long the array would be.
|
|
|
|
|
Tells us what is going wrong - does it fail to run? give the wrong answers? bomb out in the middle of a calculation?
If you do that someone might help. I guess however that the most profitable advice would be to stop using VB6 and use VB.Net instead.
Posting your address on Facebook is not likely to bring results and is not a good idea.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
sir the code is ok but i do'nt know how to fix it in command buttons huh !
|
|
|
|
|
Describe what you are after doing and which command button that you want it doing.
But as people have said VB6 isn't a supported language anymore and most people that do VB in its many guises have moved across to .net
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
IIRC double click the button in the designer. That takes you to the code window with a stub for the buttons click event. Put your code in the stub.
I think the last time I used VB6 was in 2000 so it's a bit rusty. You might be able to do it from the properties window in the designer - I have a sneaking feeling that you can but it is better to use double click method. VB6 seemed to get confused otherwise (again I might have misremembered.)
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
sir ido'nt know were commandbottons i put the code please teach me!
|
|
|
|
|
In the code pane of the IDE, you have 2 drop down's at the top, the left one is the object and the right one is the event.
SO in the the left one, choose a command button. In the right one, choose Click.
A code stub will appear in the text editor.
Enter the code within this stub.
Sounds like you need to go right back to Page 1 of your course book, before you even worry about trying to code in inner workings of a calculator.
|
|
|
|
|
sir I add u in FB! please acept it!
|
|
|
|
|
This is easily fixed.
Tell us what the error is, and where it is occuring.
Tell us what you have so far attempted.
Do not use Facebook or Textspeak, we are not morons.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Hi,
I want someone to help me out with this problem.If you are familiar with its ROW SELECTION PROBLEM, you've might be able to help me.
Here's the scenario:
I have an MSHFLEXGRID on a form, and an ADODC Control. On start, the Datasource property of MSHFLEXGRID is set to nothing. Then, if the ADODC contains more than 0 records, the datasource propery of MSHFLEXGRID is set to the that ADODC.
-------------Main Problem----------------
When the user deletes the records, the software checks if the ADODC will be empty after deleting the specified record or not. If not, thne it simply deletes the particular record. Otherwise, it first sets MSHFLEXGRID's Datasource to Nothing, then deletes the record. But when the record is deleted and MSHFLEXGRID is populated after the insertion of a new record, the Row Selection problem occurs, as if the MSHFLEXGRID's Datasource was this ADODC. Can anyone tell me how to control it???
<b>
ANY HELP WOULD BE APPRECIATED.
THANKS!</b>
|
|
|
|
|
Hello !
i'm new in vb.net.I have to create a project and i have a question :
i'm thinking to use typed dataset.The database is on another computer in network (sql server 2008).The database has 20-30 tables and will grow not much (10-20 mb on every year)
is true that the dataset keep a full copy of original database on my computer or only the database schema? ( i have read several articles but i don't understand this).is this a performance problem for my situation or no?
Thank you in advance.
|
|
|
|
|
Have a look at this Article, first example for SQL Server ADO.NET code example[^]
As you can see you take as much data as you require for the operation and not the entire database.
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
dcode25 wrote: is true that the dataset keep a full copy of original database on my computer or
only the database schema?
No. It only holds the data that you retrieve.
Copying an entire database would be very performance prohibitive. What if the DB has 4GB worth of data in it? Or a single table for that matter? How long would it take to copy all that data?
The dataset will hold an internal schema of only the columns that you retrieve. That information is lost when the dataset goes out of scope.
|
|
|
|
|
Thank you !
But why on internet there are many articles that describe the performance problems on typed dataset.i read that typed dataset hold an offline copy of database.Now dataset holds only the schema or with all the data ?
|
|
|
|