|
Good morning
This means that you have no Update command specified. look at it this way. you cannot update without the UpdateCommand. for example, if you can try to create everything using a Wizard, just do the drag and drops. in your adapter's Properties there is a update Commnad. it tell the Adapter which column to update, when the update function is invoked as you Did.because you are not using a wizard of which is good, you have to write the updatecommand.
The Updatecommand will like like this.
UPDATE Employee SET Emp_ID = 0918, W = "w"
Hope it Helps
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
|
|
|
|
|
Initially the SELECT Command was like this...
'----------------------------------------------'
qry = "SELECT ASSSHIFT.Day12,ASSSHIFT.EmployeeId,SHIFTDETAILS.ShiftCode,SHIFTDETAILS.tIn,
SHIFTDETAILS.tOut FROM
ASSSHIFT LEFT JOIN SHIFTDETAILS ON ASSSHIFT.Day12= SHIFTDETAILS.iId
where
ASSSHIFT.EmployeeId=94 AND
ASSSHIFT.MonthNum=10 AND
ASSSHIFT.YearNum=2007
'----------------------------------------------'
Dim mycmd As New OleDb.OleDbCommand
Dim da As New OleDb.OleDbDataAdapter
mycmd.CommandText = qry
mycmd.Connection = conn
da.SelectCommand = mycmd
da.TableMappings.Add("table0", "ASSSHIFT")
da.TableMappings.Add("table1", "SHIFTDETAILS")
ds_temp.Clear()
da.Fill(ds_temp)
This is my UpdateCommand...
uquery = "UPDATE ASSSHIFT SET day12=3 WHERE EmployeeId=94 AND MonthNum=10 AND YearNum=2007"
Dim comm As New OleDb.OleDbCommand
comm.CommandText = uquery
comm.Connection = myconn ...(Connection Opened)
comm.ExecuteNonQuery()
Now I'm writing update query....
da.Update(ds_shifts)
Now the error is ....
"Update unable to find TableMapping['Table'] or DataTable 'Table'"
Happy Day!
|
|
|
|
|
Hello,
I am trying to create a custom DataGridViewColumn,
This Column has many custom properties (perhaps, of Boolean or String type)
My question is that when i try to set value in the ColumnCollectionUITypeEditor wich open on clicking the Columns() property at design time, these properties doesn't take the new value,
I Tried a lot of methods to solve this problem, but i didn't can to do.
Please, if there is any person know what can i do, write for me the solution.
Thanks...
[Thomas]
|
|
|
|
|
Hi i am trying to find out if tables and fieldnames can start with a number in access. I am writing my Select command for my adapter and I keep getting an error sayig there is a missing operator. My sql is pasted below:
Dim value As String = DateTimePicker1.Value.Date.ToString<br />
<br />
<br />
modbcmdSelect.CommandText = ("SELECT * FROM dayScheduleTemplate,dayTemplateScheduleName, scheduleDate " & _<br />
"WHERE dayScheduleTemplate.dayTemplateScheduleName = dayTemplateScheduleName.24TemplateScheduleName and " & _<br />
"dayTemplateScheduleName.24TemplateScheduleName = scheduleDate.24TemplateScheduleName and scheduleDate.scheduleDate= #" & value & "#")
Mr oizo
|
|
|
|
|
Put brackets around the field name: dayTemplateScheduleName.[24TemplateScheduleName]
---
single minded; short sighted; long gone;
|
|
|
|
|
If possible, you'd probably have to enclose any such table and field names in square brackets:
SELECT * FROM dayScheduleTemplate,dayTemplateScheduleName, scheduleDate
WHERE dayScheduleTemplate.dayTemplateScheduleName = dayTemplateScheduleName.[24TemplateScheduleName]
and dayTemplateScheduleName.[24TemplateScheduleName] = scheduleDate.[24TemplateScheduleName] and
scheduleDate.scheduleDate
|
|
|
|
|
hi all,
i have a datagridview in my program. i add column of combo type at run time .Now my problem is that how can i detect selected index change event of this combo.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Youre trying to treat that ComboBox like it's the same one you drop on a form. It's not. That combo is buried under a DataGridViewComboBoxCell as the cell's Edit Control, which is buried under a DataGridViewComboBoxColumn.
What do you think you need this for?? Under any normal circumstances, if your dataset/datatable, dgv is configured correctly, you would never need to handle this event.
|
|
|
|
|
use the event cellendedit.
Dim indexcombo As Integer = 0
If e.ColumnIndex = 0 Then<br />
indexcombo = CType(Me.dgvTipuriColoane.Rows(e.RowIndex).Cells(e.ColumnIndex), DataGridViewComboBoxCell).Items.IndexOf(Me.dgvTipuriColoane.Rows(e.RowIndex).Cells(e.ColumnIndex).Value.ToString)<br />
End If<br />
valoareCombo = Me.dgvTipuriColoane.Rows(e.RowIndex).Cells(e.ColumnIndex).Value
where the indexcombo is the index you choosed in combo.
|
|
|
|
|
That's why I asked him why he needs this. Your using an event that doesn't fire until the new value is commited to the cell. Is he looking for that?? Or is he looking to find out BEFORE the value is commited?? That's why I asked...
|
|
|
|
|
Hi everybody.
I Have two web applications that share several dll´s.
After reading about the way to avoid duplicated ocurrences of dll´s in each \bin folder of the aplications, I have decided to add the common dll´s in the GAC.
Ok it´s right, I have de dll´s in the Global Assembly Cache, but the web aplications doesn´t work.
Can anybody say me something about?, What am I doing wrong?, Is it necessary to modify something for the aplications to get access to the GAC?.
Is a matter of IIs configuration or is a programatic issue?.
Is the GAC the right way to get this sharing?.
Is there any other way to do so?.
Thanks in advance.
|
|
|
|
|
If you have an assembly being used by more than one application then yes the GAC is the way to go. u can also have multiple version of the same dll installed, something that was impossible before .net. Wat i do not understand however is wat you mean when you say the application doesn't work. Not working could be a result of many things from getting an error to getting wrong results. If you are getting an error, then wat does it say? your question in its current state is vague and almost impossible to answer. Could you please provide more information on the 'Not Working' part.
|
|
|
|
|
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.
|
|
|
|