Hello everyone, Dim SI As String = "" SI = CheckedListBox1.SelectedItem Dim TextcommandSQL As String = "" Dim myCOLUMN As String = "" myCOLUMN = ComboBox1.SelectedItem TextcommandSQL = "SELECT * FROM test_table where " & myCOLUMN & " = " & SI MsgBox(TextcommandSQL) Dim con As New SqlConnection con.ConnectionString = (" Data Source=i7borgmatrix2\sqlexpress;Initial Catalog=TextSQL;Integrated Security=True") Dim queryString As String = TextcommandSQL Using connection As New SqlConnection(con.ConnectionString) Dim command As New SqlCommand(queryString, connection) connection.Open() Dim reader As SqlDataReader = command.ExecuteReader() Try While reader.Read() Console.WriteLine(String.Format("{0}, {1}", _ reader(0), reader(1))) End While Finally ' Always call Close when done reading. reader.Close() End Try …

Member Avatar
Member Avatar
+0 forum 49

<script> function a(){ var filename="test.txt"; </script> <img src="img/test.png" title="?"/> How to get the value of "filename" in "title"?

Member Avatar
Member Avatar
+0 forum 6

my [previous question](http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/477450/convert-str-to-var) about this dealt with global vars but unfortunatley the `window` of opportunitys doesn't work with this next example because it alerts 4 times instead of only 1 test("a","b","c"); function test(var0,var1,var2,var3) { for(var i=0; i<4; i++) { if(window["var"+i]===undefined) {alert("test");} } } this may not be very clear so I will try again this time I want it to alert all three vars test("a","b","c"); function test(var0,var1,var2) { for(var i=0; i<3; i++) { alert(window["var"+i]); } } how can I achieve the identical results as with the `window["str"+var]` from within a function?

Member Avatar
Member Avatar
+0 forum 1

this is my attempt var test=["a","b","c"]; var var0="a"; for(var i=0; i<1; i++) { test.splice(test.indexOf(test[window["var"+i.toString()]]),1); } alert(test); it alerts "a,b" but I want it to alert "b,c" ref:http://stackoverflow.com/questions/5613834/convert-string-to-variable-name-in-javascript

Member Avatar
Member Avatar
+0 forum 2

**I have a fairly simple script, but I'm having trouble sizing up my randomly displayed images. I want them all to have the height of 150px. Any help would be great. Thanks! code below:** <script type="text/javascript"> window.addEventListener?window.addEventListener('load',function() { ray.rand('thisCell'); },false): window.attachEvent('onload',function() { ray.rand('thisCell'); }); // FF : IE1 var ray= { bgArr:['url(http://dl.dropbox.com/u/5739741/Tutor/13klas-600.jpg) 10% 10% no-repeat','url(http://dl.dropbox.com/u/5739741/Tutor/girl_studying_2.jpg) 6% 6% no-repeat','url(http://dl.dropbox.com/u/5739741/Tutor/CT-tutoring.jpg) 24% 10% no-repeat','url(http://dl.dropbox.com/u/5739741/Tutor/smartboard1.jpg) 31% 17% no-repeat','url(http://dl.dropbox.com/u/5739741/Tutor/math-assessment-test-tutoring.png) 55% 4% no-repeat','url(http://dl.dropbox.com/u/5739741/Tutor/one2one1.jpg) 75% 11% no-repeat','url(http://dl.dropbox.com/u/5739741/Tutor/GirlStudying.jpg) 95% 11% no-repeat'], // Background you wish to show on the cell rand:function(el) { var num = Math.floor(Math.random()*this.bgArr.length); this.getID(el).style.background=this.bgArr[num]; }, getID:function(el){return document.getElementById(el);} } </script> <style type="text/css"> /*Transparent Tables*/ table, tr, …

Member Avatar
Member Avatar
+0 forum 1

The End.