|
Thanx for your reply...I fixed the problem. I really appreciate that.
Thanx
|
|
|
|
|
I have a multiline textbox on a form that a user can type information into. When they click update it writes the contents to a SQL table. If the user types a quote in the textbox the update fails. How do I update when there are quote characters?
Thanks for any help on the matter
|
|
|
|
|
That is because you don't handle the string values in the query correctly. You have to escape some characters when you put a string value in an SQL query.
For MSSQL and Access you escape the apostrophe by replacing them with double apostrophes.
For MySQL you escape backslashes by doubling them, and apostrophes by putting a backslash in front of them.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks, I remembered reading that awhile back but had fogotten it.
|
|
|
|
|
Or you use parameterized queries (best practice!) and you won't have to worry about escaping anything yourself.
For more information, read SQL Injection Attacks and how to prevent them[^] by COlin Angus Mackay.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have created a student database in Ms-Access.
the records are stored through the FORM(VB.NET).the form has different buttons for selecting the education forex-Primary,secondary & higher secondary etc.
now what i want is once a record is saved.the value in the name field(that is the name of the student) should be listed in the listbox depending on the button clicked (as mentioned above)
raman
|
|
|
|
|
How did you fill the ListBox in the first place? All you'd have to do is call that code again.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have established a connection with Ms-Acess through dataset.Now i want to know how to generate autonumber in a textbox field(ID_NO) in my form
If i save the record then the next record should not have duplicate values
AND ALSO IF THE RECORD IS NOT SAVED THEN THE NUMBER SHOULDNOT BE SKIPPED
PL TELL ME
Arun
|
|
|
|
|
Arun Hegde wrote: Now i want to know how to generate autonumber in a textbox field(ID_NO) in my form
You don't. That number will only be generated when the record is actually written back to the database.
IF you went a "checked-out" a blank record in the database, you'd get the number generated, but you would be forced to "use or lose" the number.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:55 Friday 10th March, 2006
|
|
|
|
|
http://www.dreamsyssoft.com/image-to-pdf-library
When I regsvr32 this dll, it shows me that the dll no need to registry.
But I cannot add it to reference.
The author tells me that it can import to VB.NET directly but no need add to reference and registry.
Any one can tell me the method? Thanks.
|
|
|
|
|
cylix2000 wrote: When I regsvr32 this dll, it shows me that the dll no need to registry.
That's because it's not a COM .DLL.
cylix2000 wrote: But I cannot add it to reference.
Because it's not a COM .DLL.
cylix2000 wrote: The author tells me that it can import to VB.NET directly but no need add to reference and registry.
You have to import the functions from the .DLL to use them. THis is done using the Declare[^] statement in VB.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello, I am expereinced VB6 developer, have not coded for 3 years however. I need to design a class model for a Vb.NET application. I understand OO, I am however unclear on the implementation of Class collections in VB.NET. I read somewhere that class collections are now legacy. If so how do I enum and iterate though classes? All the topics I find on this involve a class collection still? Did I just read wrong about Class Collections being legacy?
On a similar note, are there any topic, threads on bind classes of data to the controls that show them on screen? In VB6 I did this long hand by iterating through the classes. I used the index property to do this. Will the new Handles event work with updating class collections?
Sorry if this is unclear.
Kadi
|
|
|
|
|
There are various collection classes you could use. Which one is up to your requirements.
System.Collections[^] namespace
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi I have managed to extract the following from some html source and display it in a Rich text Box.
What I would like to do now is either dsiplay just the numbers in a text box (in the above case) 3 5 8 10 44 3 & 5 or download the gifs and display then.
I can't hard code the numbers/ gifs in as they will change on a regular basis
Any help or advice would be most appreciated
Thanks
|
|
|
|
|
Could you just get the position of 'alt="' in each line, add 5 to get the position of the number you want, then just grab the following characters one-by-one until you hit another quote character?
|
|
|
|
|
You could either do it with simple String manipulation or with RegEx. If you're not familiar with Regular Expressions, it's can be a bit confusing to start with.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have now done this with another regex command as suggested in previous posts.
Many Thanks for the advice
-- modified at 12:51 Friday 10th March, 2006
|
|
|
|
|
I'm using VB.Net 2003.
I want to connect my client app to a SQL Server over the internet.
How do I send my connection request through the local proxy server?
The setup:
SQL Server --> Firewall -->>>>Internet<<<<-- Proxy Server <-- Client App
The neccesary port forwarding has already been set up.
It's not a HTTP request that I'm looking for.
|
|
|
|
|
That depends entirely on your Proxy server, what it supports, and what it requires you to do. You're first step would be to dig up the documentation on your Proxy server. You might be looking for Socks support, if nothing else.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The documentation merely specifies the setup and installation - nothing as technical as how to formulated a SQL request.
I think it may be neccesary to wrap the SQL within a HTTP request but I have absolutely no idea on how to do that. If anyone maybe knows about a site with alot of info on HTTP requests it could help me a great deal.
|
|
|
|
|
You're not looking for anything about formulating an SQL Request. You're looking for how to connect to an outside host by specifying an IP Address and port number.
You can't wrap an SQL in an HTTP blanket unless the SQL Server supports it. If not, you're wassting your time because the server will never respond since it wasn't listening on port 80, or any other port, for a web request.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote: You're not looking for anything about formulating an SQL Request. You're looking for how to connect to an outside host by specifying an IP Address and port number.
I know how to specify the IP and port to connect to but I have to connect to the proxy first because I can't connect directly to the remote IP, the proxy blocks it. How do I inform the proxy, after connecting to it, what my remote IP:PORT is?
In other words how do you specify multiple IP's and port numbers.
Because I have to connect to the proxy via IP:PORT but also to the remote SQL Server's
static-IP:PORT, my current connection settings only has provisions for one host address.
|
|
|
|
|
Some proxies require the IP and port to be specified, along with a username and password, in a special format! Some require client software to be installed on your machine. That's why you have to dig up anything you can on your proxy server. There are "standards" to these formats, about 7 or 8 of them (IIRC), but not every proxy supports every format. Without the docs on your proxy, you're pretty much screwed. How about visiting the website of the manufacturer for your proxy for more information on it???????
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 8:19 Tuesday 14th March, 2006
|
|
|
|
|
Hi,
Can anyone give me a sample code to remove duplicates from an arraylist?
I have an arraylist with duplicate entry and want the distinct values from that.
Thanks in Advance
|
|
|
|
|
Private Sub RemoveDuplicates(ByRef source As System.Collections.ArrayList)
Dim destination As New System.Collections.ArrayList
For Each item As Object In source
If Not destination.Contains(item) Then
destination.Add(item)
End If
Next
source = destination
End Sub
It would however be move efficient to perform the contains test on the original arraylist before inserting the items in the first place.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|