@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5



Comments:

<0> Lo my VB6 prog downloads an ICO file but instead of it saving it I want to display it without saving into a PictureBox - anyway I can do that?
<1> Cyorxamp: if your program downloads it, what format does it download the data in?
<0> clocKwize: like I said its an ICO
<0> the binary of the file loaded into a string
<2> why not use a picbox?
<3> why not use a turkey baster?
<2> image control is a better choice anyway
<2> ron popeil is now producing a vb6 compatible turkey baster
<1> why not just open a file and write the string to the file then?
<1> oh wait
<0> !? it doesnt matter what its being shown in
<1> i read your question wrong
<0> what matters is getting it in there
<1> thought you wanted to save without loading it into a picture box first
<1> i suggest you read the icon file format
<2> clocKwize: he wants to display it without saving into a PictureBox



<0> why on earth will that help!?
<0> no ok you're loosing me here ! :D
<0> I wanna NOT save the ICO file I downloaded (the binary of the file being stored in a String) and instead directly put it in the PictureBox
<2> btw clocKwize he mentioned that he wants to display it without saving into a PictureBox
<1> Cyorxamp: because you can then read that string with your program
<1> which will tell you where to draw the right color pixels
<1> into the picture box
<3> strings aren't the best place to be storing binary data...
<1> boxes are more suited.
<0> well I can change it from string to anything else fine - but I can remake the file no problem from the string
<0> but thats not what I want
<2> byte boxes are great
<3> http://www.youtube.com/watch?v=77H5nHdcyQM
<1> Cyorxamp, i just told you how to do it
<1> http://msdn2.microsoft.com/en-us/library/ms997538.aspx
<1> read that
<2> if i read it correctly it says http://msdn2.microsoft.com/en-us/library/ms997538.aspx
<1> plz 2 stfu
<1> Cyorxamp: i didn't just do googling for you to be ignored bitch
<0> oh sorry I was talking on another network
<0> people coming at me at all directions
<0> ok that link is so useless - is there not just a way to give the binary to the picturebox - after all it is designed to read ICO, BMP, GIF, JPG etc..
<3> so decode the data into a device context
<1> the picturebox is designed to read those formats from a file, if it had a function to read from a string then you'd have either known it already or been given the answer already.
<3> and image data wouldn't be in a string
<3> so they wouldn't make that function
<1> yeah
<4> ack!
<3> http://i81.photobucket.com/albums/j223/heroicposer/toptenlocke.jpg
<5> hi..
<5> what is the right syntax to write sql syntax in vb that contain LIKE %var% ?
<5> i tried some, but error...
<6> try harder
<7> how to make progressbar in visual basic ??
<7> anyone know the source code
<5> strquery = "SELECT * FROM tbmember WHERE '" & cmb_basic.text & "' LIKE % '" & txt_look & "'"
<5> sorry
<5> strquery = "SELECT * FROM tbbuku b,tbmasterbuku m WHERE b.idbuku=m.idbuku and '" & varcari & "' LIKE '" & % & "' '" & txt_cari % & "' % "
<5> invalid character %
<5> this also error
<5> strquery = "SELECT * FROM tbbuku b,tbmasterbuku m WHERE b.idbuku=m.idbuku and '" & varcari & "' LIKE % '" & txt_cari & "' % "
<7> how to make progressbar in visual basic ??
<7> anyone know the source code
<6> weksss: It's part of the common controls
<6> Project > components > microsoft windows common controls 6.1 #1
<6> 5 seconds on google could have answered that for you.
<6> source code begging is not a good way to ask a question around here, ESPECIALLY 5 minutes apart
<6> Write you query in here WITHOUT using any code
<6> as an example, sennyv
<5> i just confuse about the "' & <-- anyway, i have found it myself.. ^.^ thanks
<6> The only thing you need to worry about is the output
<6> take the string as a whole, then break it up
<6> s = "SELECT * FROM bob"
<6> If you wanted to replace that * with a field list, find the two strings
<6> "SELECT " and " FROM bob"
<6> and concatenate in another value
<6> "SELECT " & fields & " FROM BOB"
<6> The single quotes make it a bit more confusing, but to VB, a single quote is no different than the letter j, or the number 2 in a string. just a regular character



<5> oh so i don need to use ' ?
<6> Of course you do
<6> ' is in the output
<6> But s = "'''''''''''''''''''" is nothing special
<6> a single quote means nothing to a VB string
<6> it own't change how the string 'works', just the data contained in it
<6> If you want the output to be "LIKE '%stuff%'", make it look EXACTLY like that
<6> This SQL statement is nothing more than text. You're doing nothing more than simple string concatenation.
<6> it just has to look like valid SQL in the output
<5> select bla.... WHERE afield = " ' & variable & ' " <- i used to write like this
<8> then you were apparently used to syntax errors
<8> in the sql anyway
<5> no that's not error
<8> yes that s
<8> is
<6> certainly is
<8> the sql would only contain "select bla.... WHERE afield = "
<8> and the rest would get commented out
<6> You're confusing VB string delimiters ( the " ) with SQL string delimiters ( the ' )
<8> if you're confused about what you're doing.. write out JUST the sql first. exactly as it should be
<8> if you cannot do that much, you're more or less ****ed
<5> sorry , i mean this .. ' " & var & " '
<8> once you have that, remove any parts where a variable is supposed to go and put double qutoes around the different segments
<5> that work well
<6> yes, that works fine
<8> then combine those segments and the variables with &
<6> putting some % in there should change nothing
<8> ok.. so you were used to extraneous spaces in your database. lovely
<5> ? what spaces?
<6> yep. ****ed.
<8> the spaces before and after the variable's data in the sql's text literal
<8> if var had "foo", the sql would have "... ' foo ' ..."
<6> and, of course 'foo' is not the same as ' foo '
<5> but this show what i want..
<5> cmdcommand.CommandText = "SELECT * FROM tbbuku b,tbmasterbuku m Where b.kodebuku='" & keyfield & "' and b.idbuku = m.idbuku"
<6> and THAT will work, but that is NOT like what you typed above
<8> no spaces there now are there?
<6> (although SELECT * is bad practice, but that's another story)
<8> also, think about using an inner join
<6> an explict inner join, that is
<8> yes
<5> * bad ? but i need all the fields?
<6> SELECT * requires the database to do two things. First, it'll query the table to get a list of all the fields, THEN it'll run your query, with all the fiuend names
<6> field*
<6> it's an extra step that does not need to be taken
<6> specify each field you need in the select statement
<5> even all fields?
<6> that's the only time you'd USE select *
<6> so.... yes
<6> SELECT field1, field2, field3, field4, etc
<6> in your case, SELECT b.field1, b.field2, m.field1, m.field2, etc
<5> oh.. ok thank you very much
<5> how bout inner join
<5> ?
<6> you're using an implicit join by selecting from two tables
<5> i think it same if i write tablea,tableb
<6> it's an old syntax, on its way out, and not very descriptive
<6> not alwaysw
<6> it relies on the database to make the decision as to how to join the tables
<6> the database does not know what the tables MEAN, so it cannot always be correct
<5> depend on my where clause
<6> it's also less efficient
<6> SELECT b.field1, b.field2, m.field1, m.field2, FROM table1 AS m INNER JOIN table2 AS b ON m.field = b.field WHERE ...
<6> there's noconfusion, no guessing, no ambiguity on the database's part doing it this way
<8> i also think an inner join is more efficient
<8> i could be wrong, but i'm fairly certain it can trim the returned fields as it's joining the tables, rather than joining a complete cartesian product of the tables and THEN filtering out the deadwood
<6> sounds about right
<5> oh.. that's the way, hmm.. thanks again for ur great explanation... :)
<5> here is my query i asked first about (sql syntax using LIKE keyword)
<5> strquery = "SELECT * FROM tbbuku b,tbmasterbuku m WHERE b.idbuku=m.idbuku and '" & varcari & "' LIKE '" & "%" & txt_cari & "%" & "'"
<5> this works well
<9> You have '' around the column name?
<9> varcari
<6> it works 'ok'


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #vb
or
Go to some related logs:

suzzy wedcam
conforer global
#php
#india
#india
#allnitecafe
#allnitecafe
#allnitecafe
romatic sayari
#chat-world



Home  |  disclaimer  |  contact  |  submit quotes