|
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.
|
|
|
|
|
Well obviously not, but supposedly you do have the values of column A and B.
So when you do the insert INSERT INTO YourTable (A, B) Values(100, 150) you might as well do INSERT INTO YourTable (A, B, TotalPayment) Values(100, 150, 100 + 150) .
Or is the TotalPayment column supposed to hold the total sum of all rows?
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi there,
I have the following code which takes a table from SQL does some calculations on it and adds a couple of columns...
I'm having issues with sorting the data (descending) on Column "N" from Row 4 to row 50000 (the end of the document) the code I think should work appears to reorder the columns by the entries in row 4.
Any advice gratefully received....
<pre>
Dim SQlQuery2 As String = "select * from growth where Name <> '[Files]'AND InitialSize <> 0 order by FullPath"
Dim SQLCommand2 As New SqlCommand(SQlQuery2, myConn)
Dim SQlReader2 As SqlDataReader = SQLCommand2.ExecuteReader
Dim R2 As Integer = 3
While SQlReader2.Read
R2 = R2 + 1
osheet.Range("I" & R2).Value = SQlReader2.GetValue(0).ToString
osheet.Range("I" & R2).BorderAround(8)
osheet.Range("J" & R2).Value = SQlReader2.GetValue(1).ToString
osheet.Range("J" & R2).BorderAround(8)
osheet.Range("K" & R2).Value = SQlReader2.GetValue(2).ToString
osheet.Range("K" & R2).BorderAround(8)
osheet.Range("L" & R2).Value = SQlReader2.GetValue(3).ToString
osheet.Range("L" & R2).BorderAround(8)
End While
SQlReader2.Close()
SQlReader2 = Nothing
Dim D1 As Integer = 4
Do Until D1 = R2 + 1
osheet.Range("M" & D1).Formula = "=(K" & D1 & ")-(L" & D1 & ")"
osheet.Range("M" & D1).BorderAround(8)
osheet.Range("N" & D1).Formula = "=((M" & D1 & ")/(L" & D1 & "))*100"
osheet.Range("N" & D1).BorderAround(8)
D1 = D1 + 1
Loop
osheet.Range("I4:N50000").Sort(Key1:=osheet.Range("N4:N50000"))
</pre>
|
|
|
|
|
I am not sure, but considering that you are telling excel to do just that in the last line of your code, what is it that you wanted to happen?
My advice is free, and you may get what you paid for.
|
|
|
|
|
ok, what "should" happen is that the range of values from I4 to N50000 should be sorted in descending order by the numerical values in Column N, in this case from N4 to N50000 (As N1, N2 and N3 have text in them...)
osheet.Range("I4:N50000").Sort(Key1:=osheet.Range("N4:N50000"))
I thought that this would do that, but it clearly doesn't but I don't see what I've done wrong. Can you help??
|
|
|
|
|
I'm sorry, but you are not entirely making sense to me...
nhsal69 wrote: should be sorted in descending order by the numerical values in Column N
nhsal69 wrote: N1, N2 and N3 have text in them
Which one is it, text or numbers, or both?
Never mind, sorry, I didn't quite read it right.
If this doesn't do what you want it do to, then what is it doing, if anything?
My advice is free, and you may get what you paid for.
modified on Thursday, November 12, 2009 6:32 AM
|
|
|
|
|
N1, N2 and N3 have text in them
[quote]
Which one is it, text or numbers, or both?
[/quote]
It's both the first 3 rows contain text which should be ignored (the headers), the rest of the rows in the column contain numbers which need to be sorted in descending order.
This process should sort columns I, J, K, L, M by the numerical values in N from largest value in column N to the smallest
What the code:
osheet.Range("I4:N50000").Sort(Key1:=osheet.Range("N4:N50000"))
Appears to do, is sort the columns I, J, K, L, M, N in ascending order by the value in each column in row 4.
So for example the contents of column I move to column J because I4 has a larger value in it than J4
Does this now make sense to you??
|
|
|
|
|
So if I understand you correctly, excel is now sorting the range by column instead of rows.
If that is what is happening I think you'll have to play around with how the ranges are determined in that last sentence.
My advice is free, and you may get what you paid for.
|
|
|
|
|
I got this to work for me (Excel 2007):
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
Dim misValue As Object = System.Reflection.Missing.Value
Dim i As Integer = 1
Dim tmpConn As New SqlConnection(connStrDBHERFI)
Dim tmpComm As SqlCommand = Nothing
Dim tmpRdr As SqlDataReader = Nothing
Try
xlApp = New Excel.ApplicationClass
xlWorkBook = xlApp.Workbooks.Add(misValue)
xlWorkSheet = xlWorkBook.Sheets("sheet1")
Me.Cursor = Cursors.WaitCursor
If Not tmpConn.State = ConnectionState.Open Then tmpConn.Open()
tmpComm = New SqlCommand("Select cardcode, cardname from ocrd where 'y' not in (FrozenFor, ValidFor)", tmpConn)
tmpRdr = tmpComm.ExecuteReader(CommandBehavior.Default)
If tmpRdr.HasRows Then
Do While tmpRdr.Read
xlWorkSheet.Cells(i, 1) = tmpRdr.Item("CardCode")
xlWorkSheet.Cells(i, 2) = tmpRdr.Item("CardName")
i += 1
Loop
With xlWorkSheet.Range("A1", "B" & i)
'.BorderAround()'
.Sort(Key1:=.Columns(2), Order1:=Excel.XlSortOrder.xlAscending, _
Key2:=.Columns(1), Order2:=Excel.XlSortOrder.xlAscending, _
Orientation:=Excel.XlSortOrientation.xlSortColumns, _
Header:=Excel.XlYesNoGuess.xlNo, _
SortMethod:=Excel.XlSortMethod.xlPinYin, _
DataOption1:=Excel.XlSortDataOption.xlSortNormal, _
DataOption2:=Excel.XlSortDataOption.xlSortNormal, _
DataOption3:=Excel.XlSortDataOption.xlSortNormal)
End With
End If
tmpRdr.Close()
tmpConn.Close()
tmpConn.Dispose()
xlWorkSheet.SaveAs("c:\Temp\test.xlsx")
xlWorkBook.Close()
xlApp.Quit()
releaseObject(xlApp)
releaseObject(xlWorkBook)
releaseObject(xlWorkSheet)
Catch ex As Exception
MsgBox(ex.ToString)
Finally
Me.Cursor = Cursors.Default
End Try
End Sub
Private Sub releaseObject(ByVal obj As Object)
Try
System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)
obj = Nothing
Catch ex As Exception
obj = Nothing
Finally
GC.Collect()
End Try
End Sub
My advice is free, and you may get what you paid for.
|
|
|
|
|
I'll thank you because now that you've done his work for him, he's got better things to do.
|
|
|
|
|