|
If you post some of your code, especially the onClick event of the save button on you navigation bar.
|
|
|
|
|
Well i'm not exactly sure what code to use, i mean it's all supposed to be automatic form designer generated isn't it? I have no code for the add button on the navigation bar, yet it's functional in runtime. Save, however i have code for:
Private Sub Customer_InformationBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)<br />
Me.Validate()<br />
Me.Customer_InformationBindingSource.EndEdit()<br />
Me.Customer_InformationTableAdapter.Update(Me.CustomersDataSet.Customer_Information)<br />
End Sub
Is this right, do i need to add anything more?
Posted by The ANZAC
|
|
|
|
|
your code is correct. I'm not sure why your not seeing your updated data within the database. When you make changes to the data while using your application, can you open the database and see your application changing the data. I work with ADO.NET all the time and eveything you've discribed is correct, best I could do is look at the application and walk it from point A to B with the debugger.
|
|
|
|
|
I just don't know, maybe it's a problem with my installation. How do i veiw the database as the application runs to see if it's working.
Posted by The ANZAC
|
|
|
|
|
|
i have vs 2005 should that not have it?
Posted by The ANZAC
|
|
|
|
|
Hey guys,
I just read abt the Image Element, i realised that once user click the image, the form will b submitted.
The question is, is it possible for me the implement the 'Image Element' for the image which i declare using the bitmap class?
I.e Dim b as new Bitmap("c:\image.jpg")
|
|
|
|
|
"Image Element"? What are you talking about? And what do you mean by "once user click the image, the form will b submitted"? Are you talking about an ASP.NET app or a Windows Forms App?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hey im sorry abt the confusion.
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/input_image.asp
Im refering to an ASP.NET app
|
|
|
|
|
What are you trying to do with this?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I wanna add control to the image, so that once the user click on certain location of the image, it will show differnet things.
|
|
|
|
|
You'd be better off asking this in the ASP.NET forum.
OK. This is going to get complicated. Take a look at this[^] article here on CodeProject. Basically, you are supplying a seperate URL for the source of the image, which will generate the new image and return it in the Response.OutputStream object. You can also find out more about the process here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Im' getting system errors and i cant figure out whats wrong with my code. Im basically trying to get a form to pop up, when the timer function hits a certain time.
basically after 10secs a form (alternative1) should automatically pop up, then 35secs later the form alternative2 should popup.
below is the code.
int numberofcalls = 0 <---error: declaration expected?
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
if numberofcalls = 0 then
form alternative1 = new form() <-- form is a type and cannot be used as an expression (same error for alternative1)
alternative1.show() <-- reference to non-shared members requires an object reference
numberofcalls = 1
timer1.interval = 25000
end if
if numberofcalls = 1 then
form alternative2 = new form
alternative2.show()
numberofcalls = 2
timer1.interval = 30000
end if
help....
|
|
|
|
|
You are mixing C# code with VB code. In VB variables are declared using the Dim statement.
---
b { font-weight: normal; }
|
|
|
|
|
Instead of:
jady84 wrote: int numberofcalls = 0
Put:
Dim numberofcalls as integer = 0
Posted by The ANZAC
|
|
|
|
|
Start VB.Net Pogramming with microsoft MCSD & MCAD books
but ur problem
1) create ur own two forms ,Firstform & Secondform
2) enable timer & set the interval property=1000 (1 Sec)
3) in the timer tick sub write:
static i as integer
i+=1
select case i
case 10
FirstForm.Show
case 35
SecondForm.Show
end select
AEK
|
|
|
|
|
Hi,
I have some perl codes that i would like to use in Visual Studio.Net.
Is it possible for me to do so? I am coding in VB.
Thanks in advance!
|
|
|
|
|
I am not really sure what you are asking, but you can convert the perl code to VB.NET or you can call System.Diagnostics.Process.Start ("perl.exe scriptname.pl").
Mike Lasseter
|
|
|
|
|
Hi Mike,
Thank you for your help
Silver
|
|
|
|
|
Hi,
I'd like to know how to display all processes currently running in a ListView control, and if the user right-clicks on a process that an options menu pops-up with the action: close, and then the process has to be closed. Any ideas, anyone? (sample code svp )
--Zaegra--
|
|
|
|
|
Using the System.Diagnostics.Process class you can get a handle on all the current processes of the user computer. You can use the GetProcesses() method to return an array of processes that can then be altered through a limited feature set.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
The Following code will be useful to you to get the process
-----------------------------------------------------------------------------
Public Function GetProcess(ByVal strquery As String, ByVal strhost As String)
Try
Dim searcher As Management.ManagementObjectSearcher
Dim connect As New Management.ConnectionOptions()
Dim objcollection As Management.ManagementObjectCollection
Dim observer As Management.ManagementOperationObserver
Dim mgmtscope As Management.ManagementScope
Dim oq As New Management.ObjectQuery()
If Not String.Compare(HostName, Environment.MachineName, True) = 0 Then
connect.Username = UserName
connect.Password = Password
End If
mgmtscope = New Management.ManagementScope("\\" & HostName & "\root\cimv2", connect)
mgmtscope.Connect()
oq.QueryString = strquery
searcher = New Management.ManagementObjectSearcher(mgmtscope, oq)
objcollection = searcher.Get()
GetProcess = objcollection
Catch exe As Exception
MsgBox("Failed to connect to the specified machine : " & exe.Message, MsgBoxStyle.Critical, "Connection failed")
End Try
End Function
-----------------------------------------------------------------------------
After this populate the values in the list view
To start or stop the process use the conntext menu, there use
system.Diagnostics.Process.Start(applicarton name.exe) to start(This can be got from selected value prpperty from thhe list view. similarly to stop
system.Diagnostics.Process.Stop(applicarton name.exe))
I think its ok its working for me
sdddf
|
|
|
|
|
hi gyes,
I ma trying to excecute an insert statement to the data base but it does not work for a reason I don't know. the following code displays what I have.Please if any bode can help:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim q As String
q = "insert into user_proj_trans(user_index,proj_code,proj_trns,user_expired_time) values(1,1,1,'30/12/2006')"
Dim com As New OracleClient.OracleCommand
Dim con As New OracleClient.OracleConnection("user id=osama;data source=dev;password=osamama")
com.Connection = con
con.Open()
Dim da As OracleClient.OracleDataAdapter
com.CommandText = q
Try
If con.State = ConnectionState.Closed Then con.Open()
com.ExecuteNonQuery()
Catch ex As Exception
ex.ToString()
End Try
MsgBox("process had been done successfully...")
con.Close()
End Sub
O.N.Barahmeh
|
|
|
|
|
what error are you getting?
|
|
|
|