|
I'm a beginner too.
I purchased a large book called "Mastering Visual Basic.Net" and a small one called "Visual Basic.Net in Easy Steps" . The small book cost $10 and gave me clear examples and showed me how to do basic things...enought to let me write my own first semi-complex program.
The large book cost $50 and was full of definitions with a few abstract examples. The cheap, small book is so much better. If I were you, I'd get that one..."Visual Basit.Net in Easy Steps"
Good luck.
If you make yourself a sheep, the wolves will eat you!!!!!!!!!!
|
|
|
|
|
i have a small project of multilease project
in that i want to add vehicle,delete and edit and save the following vehicle
for xample if a salesman selects toyata camry he hsould be able to add the vehicle,delete vehicle ,edit vehicle and save vehicle
ho should i write using a vb code
aaffi
|
|
|
|
|
Please tell me you are joking!
James Kennelly
|
|
|
|
|
|
Hello
I' have a problem with starting a windows service programmed in VB.Net
In all OS (win2000 and upper) the service runs sucessfully ,but in one specific computer with (win2000 Server) the service give's me this error:
Service cannot be started. System.InvalidCastException: Cast from string "4/" to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format.
at Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value, NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value)
--- End of inner exception stack trace ---
at Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value)
at RufosFileWatcher.RufosFileWatcher.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
Can someone help me on this ??
Thanks
|
|
|
|
|
It looks like the command line arguments you supplied to start the service don't have a space in them where one should be. Mind you, this is a wild guess based soley on the stack trace you posted.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your reply
OK but I don´t pass any arguments to start the service.
Do you mean OnStart(String[] args)?
I just use the installutil -i (Service name)
and to start the service I use the serviceController:
Dim Myservice as new ServiceController("Name of the service")
Myservice.start
MyService.Refresh
But if I use the start in the services panel it give´s me the same error.
Thanks
|
|
|
|
|
It looks like it's complaining about something in your OnStart code. Is this .EXE known to be exactly the same as the copies on the other machines? Does the machine have the correct version of the .NET Framework and any service packs on it?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes it is the same deployment cd of the other machines.
About the .Net Framework:
That is what i am suspecting. The framework installed is the 1.1 but I don´t know if it has any service packs.
I will try that!
Thanks Dave
|
|
|
|
|
How can I delete a row from a datatable based on a condition.
Here is what I'm trying to do:
Dim row As DataRow
For Each row In Table1.Rows
If (row("Name") = "Adam") Then
Table1.Rows.Remove(row)
End If
'MsgBox(row("Name"))
Next
Thanks,
Martin
|
|
|
|
|
put this in a click command dont forget to put in your binding manager, data adapter and dataset
dimdgrdelete as dialogresult
try
dgrdelete = messagebox.show("delete this record?", _
"Confirm Delete",Messageboxbuttons.YesNo)
if dgrdelete = dialogresult.yes then
with bmanager 'bindingmanager
.removeat(.postion)
end with
daAdapter.update(dsDataset)
dsDataset.acceptchanges
end if
catch err as exception
messagebox.show(err.message)
end try
James Kennelly
|
|
|
|
|
oopps
dim dgrdeleteas dialogresult
James Kennelly
|
|
|
|
|
I wasn't able to replicate your example, I never worked with the binding manager. Below is what I did. Is there a more efficint way?
Dim row As DataRow
Dim i As Int16 = 0
Dim ar As ArrayList = New ArrayList()
For Each row In Table1.Rows
If (row("Name") = "Adam") Then
ar.Add(i) 'add the index of the row to be deleted
End If
i = i + 1
Next
Dim index As Int16
For index = 0 To ar.Count - 1
Table1.Rows.RemoveAt(ar.Item(index))
Next
datagrid1.SetDataBinding(Table1, Nothing)
datagrid1.RetrieveStructure()
|
|
|
|
|
<br />
Dim rows() as DataRow<br />
<br />
rows = Table1.Select(" Name = 'Adam' ")<br />
<br />
If rows.Length > 0 Then<br />
Table1.Rows.Remove(rows(0))<br />
End if<br />
Free your mind...
|
|
|
|
|
This is what I needed.
Thanks so much,
Martin
|
|
|
|
|
How about if I want to remove ALL rows that dont' meet that criteria Table1.Select(" Name = 'Adam' ")
Dim rows() as DataRow
rows = Table1.Select(" Name = 'Adam' ")
If rows.Length > 0 Then
Table1.Rows.Remove(rows(0))
End if
Thanks,
Martin
|
|
|
|
|
I am currently writing a large database programfor a manufacturing company and I have to problems.
1) When I am setting up my DataAdapter I can not add more that about 100 fields anything past that and i get errors.
2) When a job is done I want to move it from one database to another. Right now i am doing it manually i would like a way to say send this record from database "a" to database "b"
I would appreciate any help that can be given
James Kennelly
|
|
|
|
|
vertig0730 wrote:
1) When I am setting up my DataAdapter I can not add more that about 100 fields anything past that and i get errors.
There is a 100 field limit in the DataAdapter Configuration Wizard. You'll have to do it manually if you want more, or just don't pick that many fields.
PRB: 100 Column Limit in DataAdapter Configuration Wizard[^]
Over 100 fields in an Access database? Over 100 fields in a single table? Yikes! Ever hear of MSDE or SQL Server?
vertig0730 wrote:
2) When a job is done I want to move it from one database to another. Right now i am doing it manually i would like a way to say send this record from database "a" to database "b"
You'd do it the same way you'd read and write any records. Setup connections to both databases, setup the command object to read the data from a table in Database A, and execute the command. Then assign the data from each field read to the corresponding field in the parameters of the INSERT query into Database B. Execute the write command on Database B. Do this for each record you find in database A.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
1)I thought about SQL but when this project started it was only supposed to do one thing, It got bigger quick. It now spans 5 databases mostly in the 40 field range. this last one has to use data from one of the existing databases and add to it. I have tried splitting the old information and the new information but had no luck.
2)Thank you
James Kennelly
|
|
|
|
|
How to start,stop Sql Server 2000 Service or Server Agent.
Please....In Any Language C# or VB.Net
|
|
|
|
|
There is no support for the starting and stopping of services on or from a Win9x machine. They require NT4 or better.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave Kreskowiak,
Thanks for giving time on reading my problem. I know services only exits on NT operating system. I do this on my WINXp but i don't know how to do the same job on win98.
Thanks & best regards,
Muhammad Waqas Butt
waqasb4all@yahoo.com
|
|
|
|
|
Windows 9x/Me doesn't have a Service Manager to connect to the Service Manager on the NT kernel box. You simply can't do it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have three forms. Form1 have i datagrid1 and Form2 have datagrid. First data come from form3 to Form2 datagrid and then a button click data transfer to form1 datagrid. here i add some more row and then i click on save button grid data save in to db.
I work i have do in code base not designer mode. I hope you understand me points.
Please help me as soon as possible.
|
|
|
|
|
How can i write some data using xmlTextWriter to a stream. i don't want that data in a file just a stream to hold that data. urgent
|
|
|
|