|
Ok Mbire, thanks for your answer. Sorry if I din´t write more specific details. I was not sure that could be relevant.
In a first situation I have two applications, each one with its own \bin folder containing a number of dll´s.
After adding the dll´s to the GAC, I have deleted both applications \bin folder.
Now when I try lo load the main page of one of them I receive this error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'ItemsChoiceTypeLogOn' is not defined.
Source Error:
...
Line 72: <xmlelementattribute("itemselementname"), xmlignoreattribute()=""> ByRef ItemsElementName() As ItemsChoiceTypeLogOn _
...
Source File: D:\MTscada\www\ServerTorres\App_Code\IEC61400WebService.vb Line: 72
I guess that Internet Information Server doesn´t find the adecuate dll, because if I restore the \bin folders with the dll´s inside, both applications work fine.
|
|
|
|
|
|
|
|
I have made a system which is Ordering System, I'm still a student and on Monday October 15, 2007 is my defend. My system can display datas in the listview into the textboxes on 'click' event but I want to display one single row of datas in the listview into the textboxes at form load.
here's my code:
Public Sub passToTextbox()
Try
With Me
txtCustID.Text = lstCust.SelectedItems.Item(0).Text
txtCompName.Text = lstCust.SelectedItems.Item(0).SubItems(1).Text
txtContactName.Text = lstCust.SelectedItems.Item(0).SubItems(2).Text
txtContactTitle.Text = lstCust.SelectedItems.Item(0).SubItems(3).Text
txtAddress.Text = lstCust.SelectedItems.Item(0).SubItems(4).Text
txtPostalCode.Text = lstCust.SelectedItems.Item(0).SubItems(5).Text
txtPhoneNo.Text = lstCust.SelectedItems.Item(0).SubItems(6).Text
txtFaxNo.Text = lstCust.SelectedItems.Item(0).SubItems(7).Text
End With
Catch ex As Exception
MsgBox("Establishing database connection...", vbOKOnly, "System")
MsgBox("Fetching database records...", vbOKOnly, "System")
End Try
End Sub
Private Sub lstCust_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstCust.MouseClick
passToTextbox()
End Sub
Private Sub frmCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
oCustFacade.loadToList(lstCust)
passToTexbox()
LockUnlock(2)
ButtonCtrl(3)
lstCust.FullRowSelect = True
End Sub
>>>>>> hope for a reply as soon as possible
>>>>>> may GOD bless us...
|
|
|
|
|
I'm not sure what the problem is but I'm guessing the load doesn't work.
At first sight I'd say you forgot to select a row in the load before you call the function passtottextbox (since this function uses the selecteditems property you must have at least 1 selected for it to work)
try something like this (not real code)
Private Sub frmCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
oCustFacade.loadToList(lstCust)
lstcust.selectedrow = 1
'or
lstcust.items(0).select
passToTexbox()
LockUnlock(2)
ButtonCtrl(3)
lstCust.FullRowSelect = True
End Sub
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Hi,
I did not quite understand your question but i think you could do it this way.
Private Sub Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
if lstCust.Items.Count<>0 then
txtCustID.Text = lstCust.Items(0).Item(0).Text
txtCompName.Text = lstCust.Item(0).SubItems(1).Text
...
end if
End sub
So u will simply be taking the first item on the List view, which has an index of 0. the only difference from wat you are already doing after the click event is that we are considering items that have not yet been selected hence we leave out the Selected method.
From the code you submitted, i see you have a statement block
With Me
...
End With
The block is not necessary, i think you should remove those 2 lines coz they are not serving any purpose wat so ever. They would be useful if u wanted to use methods or properties only using the (.) operator without specifying the container object.
|
|
|
|
|
Hi guys,
I am trying to add a reference to a Java Web service in my VB.Net project application, but after entering the url of the wsdl file, i get this error:
There was an error downloading 'http://myServer:8080/axis/ThisWebService.jws?wsdl'.
The request failed with HTTP status 503: Service Unavailable.
I have mySevevr included in the proxy server exception list in Internet Explorer. Please assist.
Regards
Apunyaira haashaye misodzi
|
|
|
|
|
Its becoming a curse for me on this forum of finding solutions to my problems. In this case, I had to change and use the server 'IP address' instead of the server name 'myServer'. The proxy server was not resolving the IP address correctly given the server name.
|
|
|
|
|
how i can export report from vb6 to excel
|
|
|
|
|
do u mean crystal report?
|
|
|
|
|
hai every one,
i need auto complization controls like(textbox,combobox,listbox....)
in my need is
when i type the word in textbox,combobox or some thing like that
i want to show the list corresponding when i type the character in textbox...
below the textbox etc...
or
when i type the character in textbox full word is displayed in the textbox etc.,
please tell me the solution
thank you
ganash
|
|
|
|
|
check out the property's autocompletemode/autocompletesource/autocompletecustomsource
they do exactly what you want (at least for textbox and combobox haven't tested it with anything else)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Hello
I have to pass parameters to crystal report at runtime,i have already created reports in crystal report 9,below is my code
Dim reportdocument As New ReportDocument
Dim strRptPath As String
strRptPath = "d:\Attendance System\Attendance Reports\TodayAbsRpt.rpt"
reportdocument.Load(strRptPath)
Dim paramdefs As ParameterFieldDefinitions
Dim paramdef As ParameterFieldDefinition
Dim paramvalues As New ParameterValues
Dim paramdisval As New ParameterDiscreteValue
Dim todayval As Long
todayval = Me.DTPsdate.Text.Substring(6, 4) & Mid(Me.DTPsdate.Text, 4, 2) & Me.DTPsdate.Text.Substring(0, 2)
paramdefs = reportdocument.DataDefinition.ParameterFields
For Each paramdef In paramdefs
With paramdef
Select Case .ParameterFieldName
Case "DpttNm"
paramdisval.Value = "'" & Me.cmbDptt.Text & "'"
paramvalues.Add(paramdisval)
paramdef.ApplyCurrentValues(paramvalues)
Case "pDate"
paramdisval.Value = todayval
paramvalues.Add(paramdisval)
paramdef.ApplyCurrentValues(paramvalues)
End Select
End With
Next
Dim frm As New FrmRpt
frm.crViewer1.reportSource=reportdocument
frm.Show()
the crystal report viewet is on another form ....the problem is that the crystal
report viewer doe'snt load the report
please help me ur corporation is highly appreciated
thanks
|
|
|
|
|
Please add a single line after the following Line:
frm.crViewer1.reportSource=reportdocument;
crViewer1.Show();
frm.Show();
|
|
|
|
|
Hi,
does anyone know hot to join two arrays into a third final array?
The end of the first arrays is the start of the second array.
Thanks!
|
|
|
|
|
You could write a function
Private Function JoinArrays(Array1() as string, Array2() as string) as string()<br />
dim Array3() as string<br />
for count as integer = 0 to Array1.length - 1<br />
Array3(count)=Array1(count)<br />
next count<br />
<br />
for count =0 to array2.length - 1<br />
array3(array1.length+count)=array2(count)<br />
next count<br />
return array3<br />
End Sub
|
|
|
|
|
A simpler way to do it:
Public Shared Function JoinStringArrays(ByVal source1 As String(), ByVal source2 As String()) As String()
Dim newArray(source1.Length + source2.Length - 1)
source1.CopyTo(newArray, 0)
source2.CopyTo(newArray, source1.Length)
return newArray
End Function
|
|
|
|
|
hi All
i would like to know how to design a Function that accept parameters and return a dataset. Inputs are from a textbox.
please provide example code or article or Tutorial
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswamb wrote: i would like to know how to design a Function that accept parameters and return a dataset. Inputs are from a textbox.
Where the information initially came from is unimporant to the method, it will know nothing about your text box.
Public Function MyFunction(someText As String) As DataSet
Dim result As DataSet
' Do stuff to generate the dataset and assign it to result
Return result
End Function
|
|
|
|
|
I can't help but feel that your (100% correct) response isn't going to get him much further along....
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Thanks Colin
I want to understand you Correctly
i have command text that will get records from my table based on a lis_key field that is substringed in SQl like this
SELECT Primary_ID, Boundary_area, Attrib_Code, Lis_Key, Func_Key, Actual_Extent, Improved_Value, Site_Value, Purchase_price, Purchase_date, prop_id, confidence_score, fin_ls_prediction, new_lis_key, new_func_key, Tshwane_Prediction FROM Property_mass WHERE (SUBSTRING(Lis_Key, 1, 4) = @Lis_key)
And i have a Function as you said that must accept the paramer and return a dataset like this
Public Function GetdataProperties_lissearch(ByVal strSearched As String) As Dataset<br />
<br />
Dim dsdata As dssearchlis<br />
<br />
Try<br />
dsdata = New dssearchlis<br />
dasearchlis.Fill(dsdata)<br />
<br />
Catch ex As SqlClient.SqlException<br />
MsgBox(ex.Message)<br />
End Try<br />
<br />
Return dsdata<br />
<br />
End Function<br />
<br />
I want to know how will i get the Adapter to Accept the Parameter passed.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswamb wrote: I want to know how will i get the Adapter to Accept the Parameter passed.
The adapter doesn't the command does. The adapter will have a SelectCommand or some such property.
|
|
|
|
|
Sorry about that. the Adapter Property SelectedCommand will do i know. its just that i moved to OOPS and N-tier Development, so the Classes confused me a lot, but i got the Answer. i have a Function in my DAL layer. coded like this
Public Function GetdataProperties_lissearch(ByVal strSearched As String) As DataSet
Dim dsdata As dssearchlis
Try
dsdata = New dssearchlis
dasearchlis.SelectCommand.Parameters("@Lis_key").Value = strSearched
dasearchlis.Fill(dsdata)
If dsdata.Tables("Property_Mass").Rows.Count = 0 Then
MsgBox("Township not Found", MsgBoxStyle.OKOnly, "Warning")
Else
dsdata.Clear()
dasearchlis.Fill(dsdata)
Return dsdata
End If
Catch ex As SqlClient.SqlException
MsgBox(ex.Message)
End Try
Return dsdata
End Function
And am Calling this Function from the BLL and here is the Code that is Call this Function from a BLL
Public Function Getdata_Lis_search(ByVal strSearched As String) As DataSet
Dim ws As PropDAL.Properties
Dim dsdata As DataSet
Try
ws = New PropDAL.Properties
dsdata = New DataSet
dsdata = ws.GetdataProperties_lissearch(strSearched)
Return dsdata
Catch ex As SqlClient.SqlException
MsgBox(ex.Message)
End Try
End Function
And in my Form Search button am Calling the Fuction in the BLL like this
mResvalue = txtlisSearch.Text
Dim objBUs As ProBusiness.Properties
Try
mdsprops_lis = New PropDAL.dssearchlis
objBUs = New ProBusiness.Properties
objBUs.Getdata_Lis_search(Resvalue)
mdsprops_lis = objBUs.Getdata_Lis_search(mResvalue)
dgr.DataMember = "Property_Mass"
dgr.DataSource = mdsprops_lis
Catch ex As SqlClient.SqlException
MessageBox.Show(ex.Message)
End Try
And Another module level dataset inheriting from DAL, i dont know if this is the Good idea, because everything should not bypass BLL ,
Private mdsprops_lis As PropDAL.dssearchlis
PLease comment on this one, because it gives me Errors when i instatiate from BLL
Thanks again Colin
but everything is working fine.
and i have Declared module level string Variables
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswamb wrote: i have a Function in my DAL layer. coded like this
Vuyiswamb wrote: If dsdata.Tables("Property_Mass").Rows.Count = 0 Then MsgBox("Township not Found", MsgBoxStyle.OKOnly, "Warning")
Invoking a message box from the DAL is highly inappropriate. You should have zero user interface code in there. To do otherwise would break the concept of abstracting away the Data layer away from the presentation layer.
Vuyiswamb wrote: PLease comment on this one, because it gives me Errors when i instatiate from BLL
What sort of errors?
|
|
|
|