|
u are right mr Graus ..i just wanna to thank u specially for ur effort with me ..god bless u my brother ; its the last time to ask about this project ..i swear .
cheers;);
|
|
|
|
|
Well, don't give up entirely. Just work through some other stuff so you're better able to understand the advice you're being given. I'm still trying to help, not to shoot you down in flames.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have 2 tables linked but I cannot seem to get any data to populate the subreport
I am at a loss. Is it possible to have 2 setdatasource statements.
I have a sub report which populates fine, just passing params
then the main text which pulls from a sql db which is fine and another
subreport which the headers shows up okay (I pass params to get the header text, but the data which is from another sql db does not show up. it must be something in the below snippet I am doing incorrectly. I am using dataadapters.
Dim crLtr_New As New BlueChoiceSolutionsLetterandReport.ltr_Ineligible_with_RACI
For i = 0 To 0 'Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows.Count - 1
'following line added 5-8-07 mgm testing
crLtr_New = New BlueChoiceSolutionsLetterandReport.ltr_Ineligible_with_RACI
Soln_id = Trim(Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("soln_id"))
'added 5-9-2007 mgm
Me.DsAll1.Tables("dbo_usp_WS_RACI_Summary_Reports").Clear()
'if Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("soln_id") <> sOldSolnId Then
' Me.DsAll1.Tables("dbo_get_summary").Clear()
' Me.sdaget_summary.SelectCommand.Parameters("@soln_id").Value = Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("soln_id")
'Me.sdaget_summary.Fill(Me.DsAll1.Tables("dbo_get_summary"))
Try
Me.ssdausp_WS_RACI_Summary_Reports.SelectCommand.Parameters("@Soln_id").Value = Soln_id
Me.ssdausp_WS_RACI_Summary_Reports.Fill(Me.DsAll1.Tables("dbo_usp_WS_RACI_Summary_Reports"))
Me.sscusp_WS_RACI_Summary_Reports.Parameters("@Soln_id").Value = Soln_id
Catch ex As Exception
MsgBox(ex)
Exit Sub
End Try
'End If
With lblStat
.Text = "Setting Report Parameters"
.BackColor = Color.White
.Refresh()
End With
sOldSolnId = Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("soln_id")
crLtr_New.Database.Tables("dbo_usp_WS_RACI_Summary_Reports").SetDataSource(Me.DsAll1.Tables("dbo_usp_WS_RACI_Summary_Reports"))
'crLtr_New.SetParameterValue("prmSoln_Id", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("soln_id"))
'crLtr_New.SetParameterValue("prmRpt_Dt", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("ltr_dt"))
crLtr_New.SetParameterValue("prmRACI", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("group_raci"))
crLtr_New.SetParameterValue("prmAddr_Ln1", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("addr_ln_1"))
crLtr_New.SetParameterValue("prmAddr_Ln2", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("addr_ln_2"))
crLtr_New.SetParameterValue("prmAddr_Ln3", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("addr_ln_3"))
crLtr_New.SetParameterValue("prmAddr_Ln4", "") 'Temp dummy var
crLtr_New.SetParameterValue("prmLtr_DtW", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("ltr_dt"))
crLtr_New.SetParameterValue("prmProvId", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("prov_id"))
crLtr_New.SetParameterValue("prmDear", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("dear_txt"))
crLtr_New.SetParameterValue("prmPhone", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("phone_txt"))
'crLtr_New.SetParameterValue("prmEff_Dt", Me.DsAll1.Tables("dbo_get_ineligible_with_sum").Rows(i)("ltr_dt"))
crLtr_New.SetParameterValue("prmModeled", Me.DsAll1.Tables("dbo_usp_WS_RACI_Summary_Reports").Rows(i)("Modeled"))
'*************************Sub report Graph Code
Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Clear()
' Me.sdausp_det_rpt_get_report_amt_util_soln_id.Fill(Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id"))
' check for rowcount and check to make sure data is being passed to somewhere
Try
Me.sdausp_det_rpt_get_report_amt_util_soln_id.SelectCommand.Parameters("@ntwk_id").Value = Network_id
Me.sdausp_det_rpt_get_report_amt_util_soln_id.SelectCommand.Parameters("@Soln_id").Value = Soln_id
Me.sdausp_det_rpt_get_report_amt_util_soln_id.Fill(Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id"))
Catch ex As Exception
MsgBox(ex)
Exit Sub
End Try
'parameters for sub report Graphs
'************************************************************
'crLtr_New.OpenSubreport("ltr_ineligible_raci_3_text.rpt")
'crLtr_New.Subreports(1).SetDataSource(Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id"))
crLtr_New.Database.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").SetDataSource(Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id"))
For j = 0 To Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Rows.Count - 1
sRACIdec = "The RACI for " & Trim(Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Rows(j)("working_specialty_desc").ToString)
sRACIdec = sRACIdec & " in " & Trim(Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Rows(j)("tccwin_area_desc").ToString)
sRACIdec = sRACIdec & " for Solutions ID " & Trim(Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Rows(j)("soln_id").ToString)
sRACIdec = sRACIdec & " is " & Trim(Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Rows(j)("raci").ToString)
crLtr_New.SetParameterValue("prmsoln_id2", Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Rows(j)("soln_id"))
crLtr_New.SetParameterValue("prmworking_spec2", Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Rows(j)("working_specialty_desc"))
crLtr_New.SetParameterValue("prm_area_desc2", Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Rows(j)("tccwin_area_desc"))
crLtr_New.SetParameterValue("prmraci2", Me.DsAll1.Tables("dbo_usp_det_rpt_get_report_amt_util_soln_id").Rows(j)("raci"))
crLtr_New.SetParameterValue("prmdesc", sRACIdec)
Next j
-Mecca
|
|
|
|
|
In a filewatcher I want to test to see if a file is complete. I tried this:
File.Open("c:\test.txt", FileMode.Open, FileAccess.Read, FileShare.None)
I don't get an exception when the file is open with Notepad.
How can I detect the file is opened by another program?
Thanks
|
|
|
|
|
Notepad doesn't lock a file open. It opens a file for Shared access, reads the file and closes it immediately.
When it goes to save the file, it opens the file for DenyShareAll, writes it out, then closes it.
dBrong wrote: How can I detect the file is opened by another program?
That depends on the behavior other program, as you've already found out.
dBrong wrote: How can I detect the file is opened by another program?
Reliably, for any application?? You can't.
|
|
|
|
|
Hi,
Am a total newbe to VB.NET so please be gentle.
I have been tasked with writing a front end to a Fortran program that my company has, basicly the front end writes a text file then calls the fortran program to process the text file thus creating a set of results. All is going well, I can create the file and call the Fortran program but I can't see how to send the name of the file I want to process to the Fortran program.
The Fortran prog will not accept arguements. I have tried using the send keys option but all it sends is a \ character so can anyone help or point me in the direction of an article that may help?
regards,
Matt
|
|
|
|
|
That depends on the Fortran app. If it doesn't accept any command line parameters, your project just got that much more difficult to control.
It MAY be possible to use SendKeys, but this is problematic. If the app you launch isn't ready for input, you're sending keystrokes to no-mans-land. When you launch the app using the Process class, there is a method called WaitForInputIdle that will cause you app to stop and wait until the launched app finishes starting up and enters it's idle state.
|
|
|
|
|
Ok will try that, have tried forcing a wait by opening the prog then using a message box then sending keys to the app but all this does is place a \ charcter in the frotran app.
regards,
Matt
|
|
|
|
|
No real choices. Controlling another application that doesn't have any kind of remoting abilities is a crap shoot at best.
After the messagebox line in your controller app, did you make sure the Fortran app has the input focus?
The last option is rewrite the Fortran app!
|
|
|
|
|
I would like to know if anyone knows of a website that will explain and give lots of examples of VB 2005 Deployment Condition property syntax. I want to be able to set the condition so that if the a file is already installed it wont be overwritten or cause errors. I am using Windows Installer 3.1. I do not want to use other installers and i know its possible.
|
|
|
|
|
Hey guys, I have been creat a service and it is just about finished all i need to do now is creat the deployment project and the question that i have is this. Is there any way to have the service start automatically right after the the install is finished? I know there are custom actions that I am sure can do this but I dont know how to get that to work.
Please help and thanks again in advance.
Travis Combs
|
|
|
|
|
|
Hello, I am trying to look in a table to see if the item already exisits before I add another one. I have a simple table with 2 fields. The primary key is one and it is an auto number, the other is the description that I am trying to check for.
The name of my table is OrdersListBoxInfo and the table name I am trying to compare with is Order. Once I get to the line "Count = cmd.ExecuteScalar" I am getting error "No value given for one or more required parameters."
Here's the code I am running. Can anyone tell me what I am missing/doing wrong?
Dim OrderName As String
OrderName = txtOrderName.Text
'Check to see if this Order already exisits
Dim Count As Integer = 0
Using Connection As New OleDbConnection _
("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Costco\My Documents\Visual Studio Projects\AnesXL.mdb")
Dim cmd As OleDbCommand = New OleDbCommand _
("Select Count( OrderName ) as ExistingRecords From [OrdersListBoxInfo] where [Order]=?", _
Connection)
cmd.Parameters.AddWithValue("@Order", OrderName)
Connection.Open()
Count = cmd.ExecuteScalar
End Using
If Count > 0 Then
MessageBox.Show("Number of rows found: " & Count, "Add Date", MessageBoxButtons.OK)
Return
End If
|
|
|
|
|
You said in your description you have two tables. But, this operation you're describing is only working on one table. Which is it? Shouldn't the WHERE clause lok like this:
SELECT COUNT(OrderName) As ExistingRecords FROM OrdersListBoxInfo WHERE OrderName=?
I also don't like using AddWithValue . It leaves too much up to interpretation by the OleDbParameter class. I'd do it like this instead:
cmd.Parameters.Add("@OrderName", OleDbType.VarChar, 50).Value = OrderName
You might also want to validate what's in OrderName before you assign the value to the parameter.
|
|
|
|
|
I’ve got a function for sending a file to a remote host wich Is as follows
Public Sub SendFiles(strTemp As String)
Dim lngWnd As Long
Dim strTxtFile As String, strBchFile As String
strBchFile = "c:\trace.bat"
strTxtFile = "c:\trace.txt"
Open strTxtFile For Output As #1
'cchs
Print #1, "open myhostname"
Print #1, "MYUSERNAME"
Print #1, " mypassword "
Print #1, "lcd c:\"
Print #1, "cd /disk1/"
Print #1, "bin"
Print #1, "get " & strTemp
Print #1, "disconnect"
'JDP1p000.001
'tnt ftp site
Print #1, "open remotehost "
Print #1, "romote host name"
Print #1, "remote host password"
Print #1, "bin"
Print #1, "put " & strTemp
Print #1, "bye"
Close #1
lngWnd = Shell("ftp -s:" & strTxtFile, vbMinimizedFocus)
Kill "c:\" & strTemp
The problem is that I don’t have a way of knowing whether a file has been transferred successfully or not
Pls help
im a junior developer at a company called securemail in south africa
|
|
|
|
|
This has the makings of a nightmare...
First, you're app is writing a script file, then launching an external application which executes the script. Is this FTP a DOS app or a Windows app?? If DOS, then you need to pipe the FTP app's output to another file using a command line similar to:
ftp -s:scriptname > C:\ftpOutput.txt
When the Shell statement returns, you have to open the ftpOutput.txt file and read its contents and parse it up, looking for keywords that should tell you if the transfer was successful or not.
This WILL NOT WORK if FTP is a Windows app!
The best solution is to scrap all this and rewrite a new app using an actual FTP component in your app where you'll have FAR more control over the transfer process and the results of it.
|
|
|
|
|
Hi
Thank u very much for the quick response .i think i "scrap my function out"
Can u pls give me a link to a sample that i could use for my new function using an ftp component
im a junior developer at a company called securemail in south africa
|
|
|
|
|
tj28 wrote: Can u pls give me a link to a sample that i could use for my new function using an ftp component
I don't have any VB6 examples. I haven't used it in about 6 or 7 years now...
Googling for "VB6 ftp example" reveals a bunch[^] though.
|
|
|
|
|
Does anyone understand why when i put an image in the background of a form that it displays correctly for approximately 5 seconds but then the same image is applied within the window overlapping the first image but offset. The only way i've found to get around this is to set the 'Show in taskbar' to false.
I've also found that if i minimise the form and then restore it, it does exactly the same thing, the image in the form appears okay for 5 seconds and then does this overlap thing.
The form is approximately 800x600 pixels and set to appear in the centre of the desktop. If i set the form to 'manual' and have it start at position 0,0 then the overlap thing doesn't occur, or if it does, then it's not obvious as it must be overlapping in exactly the same position.
Any ideas other than putting it into a picture box, which isn't an option as i have text with it's back colour set to transparent, and the transparency is obviously lost if i put text over a picture box.
Brian Hull
|
|
|
|
|
What happens if you create a new project and set the default form's background image to this image and run it?
|
|
|
|
|
I have tried making a new project, and it does exactly the same thing.
I'm beginning to think that it's a bug in the software.
Brian Hull
|
|
|
|
|
Not one I can replicate.
How about with a different image of the exact same size and color depth? What are those numbers anyway?
Is this a multi-frame image?
|
|
|
|
|
I have tried this with different images of the same size and different size, but it always does it.
Sorry but i don't know what a multi frame image is.
I could always email you the screen grab and the original file for you to take a look at?
Brian Hull
|
|
|
|
|
Brizee wrote: Sorry but i don't know what a multi frame image is.
You've seen animaed GIFs, right? That's a multiple frame image. Each step in the animation is a seperate frame. Multiple full-frame images in the same file.
Hmmm... I can't seem to duplicate the problem. BackgroundImage of the Form, right?
|
|
|
|
|
Sorry for being so dense.
It's not a multiple frame image no, just a BackgroundImage on the form, an index coloured png file at that, just to try and keep the file size down.
Basically i have made a card game and in the game you choose one of 5 options and depending on the option chosen dictates which backgroundimage is visible. It's basically to give it a nice GUI, instead of a plain colour.
I am starting to think that maybe the issue lies simple with my version of VB.Net.
Brian Hull
|
|
|
|