|
When you read blob fields (text, image, et.c.) from a recordset, they have to be read in the exact order that they come in the recordset, i.e. row by row, field by field, and each field can only be read once. If field 93 and 94 are blob fields, you have to read field 93 first, then field 94. If you read field 94 first, you skip past field 93 so it's discarded.
The reason for this is that the data for those fields can be much larger than the input buffer, so the data is sent in a separate stream. You can only read the data for the blob fields in the order that it comes in the stream.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
So text fields are blobs.
And blobs are ugly!!!!
So if it were vartext instead of text it would work???? Since we do not have control of the database we have to live with it.
This makes the programming extremely ugly because we need all the fields and then also need specific fields. This will require scanning the names to find the fields offsets for the fields we need.
But this does explain a lot even though I don't like it very much.
Thanks.
Jack
|
|
|
|
|
QBTeKcom wrote: So if it were vartext instead of text it would work?
Yes, the varchar data is sent in the buffer.
QBTeKcom wrote: This makes the programming extremely ugly because we need all the fields and then also need specific fields. This will require scanning the names to find the fields offsets for the fields we need.
That's not extremely ugly at all. That's basically what the recordset does every time you access a field by name, that's why it's faster to access the fields by index.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi
I am uploading a text file on a Linux server but after uploading when I download the same file again (to download again I am using CuteFTP) and open it then I see that there are an extra line breaks after each line.
I am using FtpWebRequest method to upload the file while UseBinary is set to true.
Can you please help me out asap?
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
This sounds like it could be a problem with the editor you are using.
Linux (and most unix like os) use LF (linefeed, chr(&h0a)) to signify a new line.
Windows uses CRLF (Carriage Return+Line Feed, chr(&h0d)+chr(&h0a))
I suspect that some editor you have used has converted from the Linux newline format to the windows newline format.
If you could do a hex dump of the file at all stages, and check for the line breaks you should be able to see where this is happening.
(oh, and CuteFTP is also set to use Binary for the specific file format you are using isnt it? )
|
|
|
|
|
Hi
Thanks for the reply.
Well I figured out that it was due to binary mode set to true so I just switched off binary mode and switched on passive mode and my problem solved.
Problem was due to Linux server as it was manipulating the file if uploaded through binary mode and the file was huge too, and passive mode just did the trick so I am happy now.
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
I need to center a picture box in the exact middle of my windows MDI Parent form. Can anyone tell me the easiest way or best way to do this through code. Thank you!
|
|
|
|
|
The client area of an MDI form is an ordinary control, although it is not directly exposed by the form. This is a method I have in Class Toolbox:
Public Shared Function GetMdiClient(ByRef MdiForm As Form) As MdiClient
Dim Client As MdiClient = Nothing
For Each C As Control In MdiForm.Controls
Client = TryCast(C, MdiClient)
If Client IsNot Nothing Then Exit For
Next
Return Client
End Function
With that, you can then use this code:
Dim MC As MdiClient = Toolbox.GetMdiClient(MyMainForm)
If MC IsNot Nothing Then
PictureBox1.Top = (MC.ClientRectangle.Height \ 2) - (PictureBox1.Height \ 2)
PictureBox1.Left = (MC.ClientRectangle.Width \ 2) - (PictureBox1.Width \ 2)
End If
Using this technique, you can do things like change the background color of the MDI client area. MdiClient exposes a BackgroundImage property, which might allow you to dispense with the PictureBox entirely.
Edited to fix another bug
modified on Wednesday, July 30, 2008 3:41 PM
|
|
|
|
|
I already am using a backgroundimage with the backgroundimage property. I just need another image ( a logo ) to overlay the background image and always be in the center of the MDIForm. I am about to attempt to try your method, I appreciate your response and I will let you know if it works or not. Thanks again!
|
|
|
|
|
I tried what you wrote and for some reason it isnt liking this line of code :
Dim MC As MdiClient = clsGetMDI.GetMdiClient()
I get a squiggly under clsGetMDI.GetMdiClient. I changed the name of the class by the way from toolbox to clsGetMDI. It is saying argument not specifyed for the parameter frmMainMDI in the public function getmdiclient etc. frmMainMDI is the name of my MDI Parent form. I have the exact same code you do except I replaced MDIForm with the name of my actual MDI form and I have a different class name where the function is located, that is it. Other than that I am using the exact same code.
Any thoughts????
|
|
|
|
|
You need to pass in the the form. Sorry about that.
|
|
|
|
|
Ok gotcha, it is working fine now. Thank you for your help. You saved me a major headache... Thanks!!!!
|
|
|
|
|
DataGridViewTextBoxCell has a single constructor, which takes no parameters. I would like to extend it to have a constructor with an object parameter, which will set its value in one statement, like this:
DGVRow.Cells.Add(New DataGridViewTextBoxCell(StartingValue)) The extension method should look like this:
Public Module Extensions
<Extension()> _
Public Sub New(ByVal this As DataGridViewTextBoxCell, ByVal Value As Object)
this.Value = Value
End Sub
End Module This produces error squiggles under Public ("Shared 'Sub New' cannot be declared 'Public'") and New ("Shared 'Sub New' cannot have any parameters.") Using any name other than New eliminates the errors.
Can what I want to do be done without subclassing?
|
|
|
|
|
You would have to create a class derived from the DataGridViewTextBoxCell and then add a constructor that would call its base constructor.
Also, since the new constructor is used on a per instance basis you cannot use the shared keyword.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
I'm guessing that the Shared keyword is added implicitly, by virtue of it being in a module. Ah, well.
|
|
|
|
|
Yes, everything in a module is static.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I need to develop an windows based application in vb.net 2003. I have access 2003 database where an exisiting data with primary key( for combination of 3 fields).I need to import data from excel 2003 and add to the existing records of access database.Before adding, it should check for any existing records in access databaseWith the help of primary key( only unique records).only new records should get inserted into database.my excel file may contain more than 2000 records with around 15 columns. I’m finding it very difficult to proceeed for writing code for this in vb.net 2003 as I’m a beginner. Pls help me in this regard…any sample codes wil help me a lot…
Thanks all in advance for ur valuable suggestions...
Regards
chandru
|
|
|
|
|
chandrubngit wrote: I’m finding it very difficult to proceeed for writing code for this in vb.net 2003 as I’m a beginner. Pls help me in this regard…
I suggest taking on simpler tasks until you are up to speed with vb.net....
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have have 4 batch files that I need to start as a process one after another? How do I make them to wait for the other one to finish before another one starts? I tried google, no luck
|
|
|
|
|
|
hi,
here i want to know, did tcplistener for my server windows form application can listen to only one choosen IP client?
i make my tcplistener in a thread that always listener to the incoming client IP, for example i want to listen to only client ip "192.168.168.2" and ugnore other IP, can i do that?
|
|
|
|
|
Yes, just check to see if the client's IP is one that you accept. Refer the second post here[^] on how to get the client's IP.
|
|
|
|
|
Can I see programmatically whether a given ocx is registered?
Thanks!
|
|
|
|
|
|
OK, I'm going to try it...
Thanks!
|
|
|
|