|
hi,
String.Replace('-','_')
hope this works.
nitin...
|
|
|
|
|
Try using regular expressions like:
regex.Replace( yourString, "-", "_")
where regex is the regular expression and yourString is the string in question. Hope this sheds some light
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
Dim s As String = "000-000-000-000"
Dim i As Int16 = InStrRev(s, "-")
Mid(s, i, 1) = "_"
MsgBox(s)
|
|
|
|
|
Will the string always be the same length, as in 4 sets of characters seperated by 3 dashes?
Posted by The ANZAC
|
|
|
|
|
Is this VB.NET ? If so, then you should use the string. methods, not the ones provided. But, any sort of replace method will replace them all. as someone suggested, if the format is always the same, you can use an index to replace the one character that's in the same place evry time.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
I'm not sure under which category I should ask this. But here goes:
I am trying to implement a search which will allow a user to search for Projects by the 'StartDate'. What they can do is search for Projects:
[Greater Than] date entered,
[Less Than] date entered,
[Equal To] date entered,
[Greater Than or Equal To] date entered,
[Less Than or Equal To] date entered.
I have a subroutine which passes the date inputted by the user to a method in a class file.
This method accept the input as String.
I would like to know how to proceed with determining how to tell the system to check if the input date is greater than, less than, etc..
I mean.. SQL can say 2 is greater than 1, but can it say 01/01/2006 is greater than 01/01/2005 ??? If not, do I need to do anything in VB.net?? Or even so, do I need to do anything special to the SQL Query ?
Please help. Thank you.
|
|
|
|
|
Wouldnt you also need a parameter to say how you want the dates compared? Greater than / Less than / ...
All relational databases support date comparisons, provided that you have defined the column as a date type.
|
|
|
|
|
Ah I see. So what you are telling me is that SQL Queries will understand that 01/01/2006 is GREATER THAN 01/01/2005.. even tho they are DATES and Numbers.
That's all I needed to know ... for now >=)
Thanks for the reply.
|
|
|
|
|
u CAN compare datetime variables in sql as in vb too,
BY < or > or =
|
|
|
|
|
Hi All,
Anybody know how to drag drop multiple rows from one datagridview
to another.I know how to drag drop single row.If any body have idea please
guide me how to do this.
thanks,
rama.
venkat
|
|
|
|
|
MonthCalendar DateChanged event gets fired automatically in every 2 minutes.
Does anyone know why this happen and how can stop this?
Thanks
|
|
|
|
|
Mathew Sujesh wrote: MonthCalendar DateChanged event gets fired automatically in every 2 minutes
By an chance are you using a Timer somewheres that triggers the event every two minutes?
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
Hi
I'd like to change the source code of some html pages before the page will be dispayed for the user. For example the login data should be filled in and not changebal any more. that means a textbox should get the value information and the readonly.
But at least i have no idear how to manage.
Thanks for any help
Tim
|
|
|
|
|
Hi,
I want to put together an application which allows the user to enter prices from their suppliers.
In a lot of cases, suppliers offer price breaks - so the more the customer buys, the cheaper the unit price will be for that item.
My question is two fold ....
1. Is the DataGrid the best method of recording prices "from" and "to"? I suspect it is, but if there is a better method, I'd be interested to hear.
2. If the DataGrid is the best method, how do I validate the entries to ensure that the user is filling the grid in correctly? For example, if the user enters a price for 1 to 10 units as being £1, but they accidentally enter a second price for 9 to 20 as £0.90 - how do I catch it?
Thanks in advance.
|
|
|
|
|
how to use events in communicating between two applications.
|
|
|
|
|
WM_COPYDATA
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi
i want to do it in vb.net. the process is like this.
1 application is controlling motion and other is vision checking.
when reached to a position will send an event to 2nd application to do checking. once the checkig is done will inform the motion about the status.
Thanks in advance.
|
|
|
|
|
OK. WM_COPYDATA is still the easiest method for inter process communication.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
sorry i dont get any seperate section for VB
i have a problem related to vb and sql-server connectivity.
i have developed an application thru vb and sql-server.
when i m using it frm my pc it works fine
but frm client pc it does not connect to database.
in fact i tried different server to connect from client's pc..
still same error
"SQL-Server Does Not exist or access is denied."
although when i ping the server frm client's pc i m gettin reply.
error on this line....
my connection string is
costr="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;password=;Initial Catalog=TestCapex;Data Source=192.168.41.2"
conn.open()
this ip is in my local network
on client pc sql-server client utility is installed
wht to do..
i m very much confused
plz,plz,plz
i ll be very thankful
reply ASAP..
Ajay
|
|
|
|
|
I am not sure but you think it may be a firewall problem..
|
|
|
|
|
thank u
but i dont satisfy...
|
|
|
|
|
If the client is on the very same network you and your SQL Server are on, there shouldn't be any problem at all. They should be able to PING your SQL Server using the exact same name and/or IP address specified in your Data Source clause. If the PING works, then the SQL connection should also work. That is unless there is some piece of networking between the two preventing the connection.
Just because you're using 192.168.x.x and your client is using 192.168.x.x doesn't mean that your address will work on their network. If there is another network in between, like the Internet, there will be no route between the two networks and communication will fail.
If that's the case, you have to be more specific about how both networks are setup and what hardware is involved and where.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Have you configured your SQL Server to allow remote connections? I believe SQL 2005 Express, by default does not allow remote connections.
Steve Jowett
|
|
|
|
|
i have used stored procedure for inserting data into the datagrid dynamically.everything is working fine but,the paging is not taking place eventhough i placed code for page handler as follows:
----------------------------------------
Mygrid.currentpageindex=e.newpageindex
Mygrid.databind()
----------------------------------------
the error that i am getting is :
--------------------------------------
AllowCustomPaging must be true and VirtualItemCount must be set for a DataGrid with ID DG when AllowPaging is set to true and the selected datasource does not implement ICollection.
--------------------------------------
please help me out.
tirumal
|
|
|
|
|
Hi All
I have made one application which logs to a government website from my application.
For that purpose i have created a web browser on my form and i have specified that particular URL name.
As soon as i run that form it opens that particular website
Now In that website there is 2 textboxes (user name and password) and 2 buttons (submit and cancel)
When I count no. of item by webbrowser1.controls.items.count() gives me 4
Is there a way to access these controls directly from my application by using webbrowser.controls.items(0).text = "XYZ"
something like this.......I am not able to get through with this
Also I can find a particular string in the document by
webbrowser1.document.outertext.contains("ABC") returns .T. , but how to select that particluar text automatically after finding it.
Please Help....Its Very Urgent......
Thanx In Advance
Riyaz Zujer Patanwala
I.T.Programmer
Al Jaber Energy Services
P.O.Box 47467
Abu Dhabi
U.A.E.
|
|
|
|