|
<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
|
|
|
|
|
I don't have the compilter in front of me, so I can't verify this, but you should be able create a MemoryStream object, docs are here[^] on MSDN and use that as the backing store for the XmlTextWriter . XmlTextWriter can accept any class that inherits from the Stream class, which MemoryStream does.
' Create an auto expanding MemoryStream object
Dim memStream As New MemoryStream()
' Create a new XmlTextWriter using the default encoding of UTF-8
' and point it to the new MemoryStream backing store.
Dim writer As New XmlTextWriter(memStream, Nothing)
writer.Formatting = Formatting.Indented
writer.Indentation = 4
writer.WriteStartElement("Clients")
writer.WriteStartElement("Client")
writer.WriteStartElement("Name")
writer.WriteString("Joe Bag 'o Donuts")
writer.WriteEndElement()
writer.WriteEndElement()
writer.WriteEndElement()
Don't forget to .Flush() and .Close() when you're done!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanx dave, one little question. Do i need to install the parser for writing xml in "ISO-8859-1" encoding or does .net provides support.
|
|
|
|
|
Parser?
Are you talking about writing yor XML using ISO-8859-1 encoding? I'm no expert on Encoding, but I don't think it's supported directly by the .NET Framework in a write situation. It'll support reading an ISO-8859-x encode, but I don't think support comes with writing it.
That'll take some further research to see if a class already exists. Try Google. There's also nothing stopping you from inheriting from System.Text.Encoding and creating your own Encoding class.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi To ALL!
In VB.NET, i have an integer variable whose value is set to 0 but i need to convert the value of the variable as null while saving to sql database.
for example,
dim i as integer
i=0
ie, i need to convert the value of i to null
can i be able to do that ?
Pls give me some suggestions
Regards,
Mahesh
|
|
|
|
|
You could use DbNull.Value , found here[^] in the MSDN documentation.
All you would need to do is check i for a 0 value before you either assign the value of i to your parameter object or the value of DbNull.Value .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is it possible to handle an event from a COM object in VB for Applications? How?
Thank you in advance.
|
|
|
|
|
http://www.sunny-beach.net/manual/306.htm
|
|
|
|
|
Thanks for answering, but it isn't what i'm looking for.
I'm able to create the object and call its methods. The problem is that the COM object throws events, and i don't know how to handle them.
For example in VB.NET i have
dim WithEvents myCOMObject as New MyCOMClass
Then, i can catch the events that myCOMObject throws easily. But I have try to do the same in VB for Applications and i can't use WithEvents. So, is there another way?
I'm not a VB programmer, I'm just doing some testing applications for my COM project.
Thanks for the help.
|
|
|
|
|
Option Explicit
Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000
Private Declare Function FormatMessage Lib "kernel32" Alias _
"FormatMessageA" ( ByVal dwFlags As Long, lpSource As Long, _
ByVal dwMessageId As Long, ByVal dwLanguageId As Long, _
ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Any) _
As Long
Private Function MessageText(lCode As Long) As String
Dim sRtrnCode As String
Dim lRet As Long
sRtrnCode = Space$(256)
lRet = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0&, lCode, 0&, _
sRtrnCode, 256&, 0&)
If lRet >0 Then
MessageText = Left(sRtrnCode, lRet)
Else
MessageText = "Error not found."
End If
End Function
|
|
|
|
|
|
Hi everyone, first let me thank you for reading this post.
Ok, I am making my own set of controls and I would like to be able to group certain properties together. I dont mean the standard <category> tag to put them under the same header, I mean for example, like the font property.
A user can specify the whole fon style for the property by clicking the ellipse button, or they can expand the font section and modify individual parts of the font - like size, style etc.
Does anyone know how to achieve this result with your own custom properties?
thanks for all the support.
|
|
|
|
|
Do you have any idea when i tried to select the table with
Blob field i get the exception say -2147467259 - unspecified error?
rs.Open "Select * from MYTEST", db, adOpenKeyset, adLockOptimistic
I am using VB6
|
|
|
|
|
Update your MDAC to a newer version
|
|
|
|