|
SELECT name,number,city FROM mytable WHERE xxx like '%" & str & "%'"
Asif
|
|
|
|
|
Yes -as Asif says, without the quotes.
Dim sFieldName as string = cmbField.Text
Dim sSQL as string = "SELECT * FROM MyTable WHERE " & sFieldName & " = 'A Value'"
Note that you need to be wary of SQL Injection attacks etc in this case... Can the user modify the combo text?
|
|
|
|
|
Dear friends;
I am trying to cofigure Oledbdatadabter with wizard. And i am using ACCESS database.I want to use parameter in OledbDataadapter Select Command Property window.
I have simple form which has a one combobox, one datagrid and one update button. I want make select like this Select * from Banks where BankName= combobox.text but if i write Select * from Banks where BankName='CITIBANK' query is working. But i can not take parameters from combobox.
In OledbDataadapter Select Command Property window i see Parameters Property but i can not configure it.
If u can please help me about my trouble.
Thanks a lot
MAGICIANMERLIN
|
|
|
|
|
Hi, does anyone know that vb.net 2005 include the graph control or not?
|
|
|
|
|
I have a graph that needs the X axis labels to be arranged vertically. The labels are links to different pages. If I use System.Drawing's DrawString method, the link "<a href="x.aspx" >x</a>" is shown as it is instead of a link in the image. Is there any way to show the text vertically and with the links retained? Please help.
Sunita
|
|
|
|
|
I don't know really.
But I guess there are two, or may be three, options.
1) Check if the linklabel class has a predefined orientation property (I guess not ... but it's worth a check)
2) Override the linklabel onPaint method (tricky)
3) Use the drawstring, intercept the click event on the "father" object, check if it's inside your text and then launch the link.
|
|
|
|
|
Hi am looking to write a tutorial/training application that will have tranisitions between images...cross fade, pan & zoom etc. ... can't seem to find any examples on how to create these effects between images...just getting started in vb.net and looking for code examples to get up to speed.
thanks for the help!
Rick
|
|
|
|
|
You'd need to draw these yourself, manually. There's no built in support for anything like that.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Any pointers on where to look to get started?
Thanks for the response...
|
|
|
|
|
Read my image processing articles for info on accessing an image directly. Then create a control and write transitions that draw the first image, then progressively draw the second image over the top of it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
OK - I need to way to know when a class property has changed.
I have a collection of PropertyInfo and add to it thus:-
Public Class Foo
Private _PropertiesChanged As New System.Data.PropertyCollection
Private _SessionId As String
Public Property SessionId() As String
Get
Return _SessionId
End Get
Set(ByVal Value As String)
_SessionId = Value
_PropertiesChanged.Add("SessionId", Me.GetType.GetProperty("SessionId"))
End Set
End Property
End Class
But some of my classes have a great many properties ... how can I make it so that is any property is updated it adds itself to the _ChangedProperties collection without this code overhead???
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
The beauty of properties is that you can write this code at all. There's no way for it to happen automatically, thank goodness. I'd hate to pay for that overhead every time I wrote a property.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Well, I was thinking of marking the properties with an attribute so only those whose dirty state I cared about set the dirty state or having the class inherit from some base that implemented the dirty property implementation....
..but you're right - it doesn't seem to be possible. I shall just have to be less lazy.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Have you considered having a single dirty flag for the class instance?
In the property set for the properties you are interested in just set that one flag.
Or do you need to know exactly which properties have changed rather than just "Something has changed on this class"?
|
|
|
|
|
I'd need to know exactly which properties have changed.
This is an extension to the code in this article[^]...currently in SQLTableInterop.SetObjectDataToTable it writes an SQL update statement for all the properties in the class...I want to restrict that to those properties that have changed.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Hi,
I am trying to copy a file that is 287 characters long to a new location.
when I try the following to copy the file I get "The path is too long after being fully qualified. Make sure path is less than 260 characters."
Dim lcLongPath = "F:\287 characters long path...........txt"
Dim fi As FileInfo = New FileInfo(lcLongPath)
fi.CopyTo("G:\NewPath")
Does anyone know how to get around this limitation? Obviously some applications are capable of creating excessively long paths and file.
Thanks,
Zenly
|
|
|
|
|
Zenly wrote: Obviously some applications are capable of creating excessively long paths and file.
Are you sure about that? I always thougt(how do you spell the past tense of to think???) that it was a limitation of windows that paths can not be longer that +- 250 chars, and the filename itself also not longer than 250 chars or something. So 500 charcters in total.
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
The reason I thought some apps can create long paths is because the file currently exist on my machine.
The path is:
"D:\Share\TestMount\data\data\groups\123456\12345678\1234 1234567\notes\a 222 characters long....... file.msg"
I can create the file from a DOS window using
echo somthing > \\?\"D:\Share\TestMount...... file.msg"
in VB.Net when I try to access the file with Dim fi As FileInfo = New FileInfo(lcLongPath) a path too long exception error is generated.
Do you know how to access and create a file of this lenght or longer using vb.net?
thanks,
Zenu
|
|
|
|
|
Zenly wrote: "D:\Share\TestMount\data\data\groups\123456\12345678\1234 1234567\notes\a 222 characters long....... file.msg"
You're right, such a path can exist on windows, the filename is less than 250 chars or so, and the directory to it is also less.
[D:\ directory can be +-250 chars max \][filename can be +-250 chars max]
Sorry i can't help you any further, maybe it's a bug in .Net, like that .Net thinks that the total path must be less than 250 characters or so?
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Thanks.
Is there anyone else who may be able to assist?
|
|
|
|
|
Any single part of the path, a directory name or filename, can be up to 255(+/-) characters in length. But! When using a fully qualified path specification, the total length cannot exceed 260 characters.
In order to use the FQ path, you'll have to rename the file down to something more managable. Set the current directory to the path where the file is, rename it using only its filename to something shorter, then set the current directory back to what it was. You can then use the FQ path.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This is doable but I have another scenario...
I have a file list that include a FQ path. My program reads this list and tries to extract the directory from each FQ path listed. It does this using "Dim ParentPath as string = Directory.GetParent(LongPath).ToString)".
When this is executed I get "path is too long". Is there a .net function that can be used that ingores the length of the string I pass and give back the path?
Thanks
|
|
|
|
|
This has nothing to do with the .NET environment, rather it's a limit of Windows and NTFS. There is no function in the .NET BCL that will do this for you without going to the Win32 filesystem functions.
If you need it to ignore the filesystem limitations, you'll have to write a function yourself that parses up the FQ path string and returns what you need using simple string manipulations.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok. i have pased the FQ path string and created all folders but when I chdir(path) then do a file.create(filename) it still gives a path too long error. The file is 222charaters.
Any ideas here.
|
|
|
|
|
It was worth a shot, but it doesn't look like it's going to work, no matter what you do.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|