|
Even better Truncate Table Payments .
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Are the triple bangs in your subject line significant?
|
|
|
|
|
yes. it is a subtle way to indicate urgency without vexing anyone...
and it worked well.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Luc Pattyn wrote: yes. it is a subtle way to indicate urgency
That's the problem. It is just too subtle. Chris ought to allow these folks to type the subject line in a rainbow of colors, or maybe use the blink style. Or both! (!!!)
Luc Pattyn wrote: without vexing anyone
That's important. I have heard that there are some old codgers here on CP who consider noobs an acceptable substitute for cold pizza and stale coke.
|
|
|
|
|
whatever we try, I guess there will always be some cold pizza and stale coke. That's the price we pay for helping out around here...
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Luc Pattyn wrote: I guess there will always be some cold pizza and stale coke.
2 of the 4 food groups that helped me make more'n one roll-out.
I spent a little time tonight hitting you with some 5's. Your answers are bang-on and obviously an attempt to teach them how to fish for themselves (which is probably why you don't get enough thanks.)
|
|
|
|
|
I'm not really fishing for thanks; when I sense some interest, I try to stimulate it.
When some one doesn't like it, so be it.
Cheers.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Luc Pattyn wrote: I'm not really fishing for thanks
All the more reason for folks to be grateful to you, IMHO.
|
|
|
|
|
cmd = New SqlCommand("DELETE FROM payments", con)
cmd.ExecuteNonQuery()
|
|
|
|
|
Hello Everyone,
I've apparently broken the update link used when publishing an update of a windows application.
The situation is this: Recently we have been required to publish the application to two seperate publishing sites.
After publishing to the alternate sight, I reset the publishing and installation locations to the original sites, but now I'm getting warning messages specific to publishing and the users of the primary site can no longer receive updates.
Is there a way to fix this???
Here are the warning messages I'm getting:
Warning 7 Files could not be downloaded from http:
Warning 8 Unable to view published application at http:
Any help on this would be much appreciated...
cb
|
|
|
|
|
Hi,
Sorry about the error message. I'm reposting it with returns.
Warning 7 Files could not be downloaded from
http:
The remote server returned an error: (404) Not Found.
1 1 MAPproject
Warning 8 Unable to view published application at
http:
1 1 MAPproject
cb
|
|
|
|
|
I am creating a little MDI application, and have just a small issue.
I set my main form to be an mdiparent, then I add a flowlayout panel docked to the left with buttons which instantiate a new mdi child form. I want my mdiparent area to be over the menu as well so when you move the child it can go over the menu / flowlayoutpanel I added as well.
FlowLayoutPanel
Me.MenuArea.Dock = System.Windows.Forms.DockStyle.Left
Me.MenuArea.Location = New System.Drawing.Point(0, 0)
Me.MenuArea.Name = "MenuArea"
Me.MenuArea.Size = New System.Drawing.Size(196, 509)
Me.MenuArea.TabIndex = 1
Form
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(805, 509)
Me.Controls.Add(Me.MenuArea)
Me.IsMdiContainer = True
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
I pretty much want the MenuArea to be UNDER the MdiContainer, so that all child forms instantiated will be able to be over the menu.
Any ideas?
|
|
|
|
|
AFAIK you cannot get the MDI child over controls in MDI parent. Even SetWindowPos does not works.
|
|
|
|
|
As already said, can't be done.
However, you could make your menu just another MDIChild form. Position it in code at the start of the app, maybe handle the move event to stop anyone moving it, and make sure you initialise it with a reference to the Host Form so it can do it's work as a menu.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
There are certain restrictions with what you can do with MDI forms. This is one of it
|
|
|
|
|
Hi
I need to know the Crystal report4.6 and 9 and 10 code to display the report from VB6
actually i have wrote the below code and it displays the report but not results is not right however it was right when i was designing the report
the code is
Dim cn1 As New ADODB.Connection
cn1.Open ("provider=SQLOLEDB;server=CAI-MAGEDH-DT;database=Att;user id=-;pwd=-")
cn1.Execute "drop view CAR"
cn1.Execute "Create View CAR as SELECT Badgeholder ,Count(DISTINCT bdate) as Days ,9 as rate, Count(DISTINCT bdate) * 9 as Total from Newatt n inner join Bnames b on n.badgeholder = b.Snames group by badgeholder"
Dim reportfile As New CRAXDRT.Application
If cn.State = 1 Then cn.Close
If rs.State = 1 Then rs.Close
cn.Open ("provider=SQLOLEDB;server=CAI-MAGEDH-DT;database=Att;user id=-;pwd=-")
rs.ActiveConnection = cn
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Source = "SELECT * FROM NewAtt"
rs.Open
Dim reports As report
Set report = reportfile.OpenReport(App.Path & "/car1.rpt")
report.Database.SetDataSource rs
Form2.CRViewer91.ReportSource = report
Form2.CRViewer91.EnableExportButton = True
Form2.CRViewer91.DisplayGroupTree = False
Form2.CRViewer91.EnableProgressControl = True
Form2.CRViewer91.EnableProgressControl = True
Form2.CRViewer91.ViewReport
Form2.CRViewer91.Zoom 1
Form2.Show
|
|
|
|
|
Open the .rpt file, open report properties and uncheck 'Save data with report' option.
|
|
|
|
|
First i'd like to thank you for you reply but i kow this option and i have already unchecked it with no avail
the problem that when i run the RPT file it works good
but when it run under VB through code it displays the report in wrong way is it because i did inner join in my SQL Statement?
|
|
|
|
|
Hi,
I am adding two columns in "payments" table in database. Column A & B. These two are added and updated in Column "Total Payment". The code I wrote is below, its not updating the sum of A & B in column "Total Payment":
cmd = New SqlCommand("Select * FROM payments", con)
If con.State = ConnectionState.Closed Then con.Open()
myDA = New SqlDataAdapter(cmd)
Dim myDataFinalPaySet As New DataSet()
myDA.Fill(myDataFinalPaySet, "payments")
Dim TotalPaymentValue As Double
Dim TaxablePayment As Double
For Each dr As DataRow In myDataFinalPaySet.Tables(0).Rows
Dim ValA As Double = dr("A")
Dim ValB As Double = dr("B")
TotalPaymentValue = ValA + ValB
If con.State = ConnectionState.Closed Then con.Open()
cmd = New SqlCommand("UPDATE payments SET [Total Payment]= '" & TotalPaymentValue & "'", con)
cmd.ExecuteNonQuery()
cmd = New SqlCommand("Select * FROM payments", con)
myDA = New SqlDataAdapter(cmd)
myDA.Fill(myDataFinalPaySet, "payments")
DataGridPayment.Update()
con.Close()
Next
Can Someone help me onthis?
|
|
|
|
|
What are you trying to do here? You are reading an entire table, Looping through the rows and updating the entire table with the sum. This is absurd, since it will update the TotalPayments column of all rows with the sum of the last row. I believe what you are trying to acheive can be done using just one statment:
cmd = New SqlCommand("UPDATE payments SET [Total Payment]= Payment1 + Payment2", con)
cmd.ExecuteNonQuery()
|
|
|
|
|
Yeah, You are right. I will try Your solution. Thanks.
|
|
|
|
|
My column names are "A" and "B". Can I directly use ur command:
cmd = New SqlCommand("UPDATE payments SET [Total Payment]= A + B", con)
cmd.ExecuteNonQuery()
|
|
|
|
|
|
And why update the total payment column, afterward, instead of right away during the insert?
My advice is free, and you may get what you paid for.
|
|
|
|
|
During Insert, I dont have values for TotalPayment Column. I am calculating at later stage and then finally updating the TotalPayment Column.
|
|
|
|