Search Results

Search found 19688 results on 788 pages for 'con current'.

Page 60/788 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • help date format in vb.net

    - by bachchan
    Dim Con As OleDb.OleDbConnection Dim Sql As String = Nothing Dim Reader As OleDb.OleDbDataReader Dim ComboRow As Integer = -1 Dim Columns As Integer = 0 Dim Category As String = Nothing Dim oDatumMin As Date Dim column As String column = Replace(TxtDateMax.Text, "'", "''") 'oDatumMin = Convert.ToDateTime(TxtDateMin.Text) oDatumMin = DtpMin.Value Dim oPath As String oPath = Application.StartupPath ' Select records. Con = New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & oPath & "\trb.accdb;") Dim cmd As New OleDb.OleDbCommand 'Dim data_reader As OleDbDataReader = cmd.ExecuteReader() Sql = ("SELECT * FROM " & cmbvalue & " WHERE Datum>='" & oDatumMin & "'") cmd = New OleDb.OleDbCommand(Sql, Con) Con.Open() Reader = cmd.ExecuteReader() Do While Reader.Read() Dim new_item As New ListViewItem(Reader.Item("Datum").ToString) new_item.SubItems.Add(Reader.Item("Steleks i krpe za cišcenje-toal papir-ubrusi-domestos").ToString) new_item.SubItems.Add(Reader.Item("TEKUCINA ZA CIŠCENJE PLOCICA").ToString) new_item.SubItems.Add(Reader.Item("KESE ZA SMECE").ToString) new_item.SubItems.Add(Reader.Item("OSTALO-džoger-spužva za laminat").ToString) new_item.SubItems.Add(Reader.Item("PAPIR").ToString) LvIzvjestaj.Items.Add(new_item) Loop ' Close the connection.strong text Con.Close()`` when i select table,(cmbvalue) from combobox and when i select date from datetime picker (dtp) or in last case from texbox converted to date and time sql looks like this "SELECT * FROM Uprava WHERE Datum='2.6.2010 10:28:14'" and all query looks ok but am geting Data type mismatch in criteria expression. error for date (oDatumMin) when excute column in access is also set to date i have no idea what else to try

    Read the article

  • JQuery identify current CSS background-image in three-state icon/button?

    - by T9b
    Hi I have three images being used to indicate an application icon state and I'm attempting to use css to do this. No problem with the original or hover states: #myDIV { background-image: url(icons/homeBlack.png); } #myDIV:hover { background-image: url(icons/homeWhite.png); } but I need to do two other things: 1) when the item is clicked it should use the third image $("#myDIV").click(function(event){ // change this button $(this).css("background-image", "url(icons/homeBlue.png)"); }); 2) if it is clicked again it should not apply the third image again because it's already applied - so it needs to check if it has been applied My questions are: 1) simply am I missing a css trick somewhere or is Jquery the best way to do this? 2) can I check which background-image is in place and how? I can't seem to find anything in JQuery that would allow me to determine which image is "currently" in place. Thanks in advance for any help.

    Read the article

  • Warning: Cannot modify header information - headers already sent by

    - by mohanraj
    HTML <div class="side2 clearfix"> <?php include('review.php'); ?> <br/><br/><br/><br/><br/><br/> </div> </div> <div id="footer" class="clearfix"> review.php <?php $s=$_POST['name']; if($s) { $con = mysql_connect("localhost","root","stvroot"); if (!$con) { die('Could not connect: ' .mysql_error()); } $dbselect=mysql_select_db("digifreshsystems", $con); $cus_name=$_POST['name']; $cus_email=$_POST['email']; $cus_description=$_POST['comments']; $type=$_POST['type']; $created=date("Y/m/d"); $modified=date("Y/m/d"); $sql="insert into digifresh_review values('0','$created','$modified','$cus_name','$cus_email','$cus_description','$type')"; if (mysql_query($sql,$con)) { ob_start(); // Start buffering // echo "Thankyou For Your Feedback"; header('Location: ../digifresh/thankyou.php'); } else { die('Error: ' . mysql_error()); } mysql_close($con); } else { ?>

    Read the article

  • ExecuteNonQuery: Connection property has not been initialized

    - by 20151012
    I get an error in my code: The error point at dbcom.ExecuteNonQuery();. Code(connection) public admin_addemp() { InitializeComponent(); con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\EMPS.accdb;Persist Security Info=True"); con.Open(); ds.Tables.Add(dt); ds.Tables.Add(dt2); } Code (Save button) private void save_btn_Click(object sender, EventArgs e) { OleDbCommand check = new OleDbCommand(); check.Connection = con; check.CommandText = "SELECT COUNT(*) FROM employeeDB WHERE ([EmployeeName]=?)"; check.Parameters.AddWithValue("@EmployeeName", tb_name.Text); if (Convert.ToInt32(check.ExecuteScalar()) == 0) { dbcom2 = new OleDbCommand("SELECT EmployeeID FROM employeeDB WHERE EmployeeID='" + tb_id.Text + "'", con); OleDbParameter param = new OleDbParameter(); param.ParameterName = tb_id.Text; dbcom.Parameters.Add(param); OleDbDataReader read = dbcom2.ExecuteReader(); if (read.HasRows) { MessageBox.Show("The Employee ID '" + tb_id.Text + "' already exist. Please choose another Employee ID."); read.Dispose(); read.Close(); } else { string q = "INSERT INTO employeeDB (EmployeeID, EmployeeName, IC, Address, State, " + " Postcode, DateHired, Phone, ManagerName) VALUES ('" + tb_id.Text + "', " + " '" + tb_name.Text + "', '" + tb_ic.Text + "', '" + tb_add1.Text + "', '" + cb_state.Text + "', " + " '" + tb_postcode.Text + "', '" + dateTimePicker1.Value + "', '" + tb_hp.Text + "', '" + cb_manager.Text + "')"; dbcom = new OleDbCommand(q, con); dbcom.ExecuteNonQuery(); MessageBox.Show("New Employee '" + tb_name.Text + "'- Successfuly Added."); } } else { MessageBox.Show("Employee name '" + tb_name.Text + "' already added into the database"); } ds.Dispose(); } I'm using Microsoft Access 2010 as my database and this is stand alone system. Please help me.

    Read the article

  • How to use JNI, but only when available for current platform?

    - by Mecki
    What is the common way (or best practice) to optionally use JNI? E.g. I have a Java class and this class is 100% pure Java, so it can run on all platforms. However, on some platforms I'd like to speed up some heavy calculations using JNI - which works fine. Unfortunately I cannot support any existing Java platform in the world. So I guess it is fine to initially only support the big three: Linux, Windows, Mac OS X. So what I'd like to do is to use JNI on those three platforms and use the 100% pure Java version on all other platforms. Now I can think of various ways how to do that (loading class dynamically for example and either loading the JNI class or the pure Java one), but thinking that this is a common issue that thousands of projects had to solve in the past for sure, I'm really surprised to not find any documentation or references to the question how to solve this most elegantly or effectively.

    Read the article

  • Does deleting temporary symlinks interrupt current downloads/access to that symlink?

    - by Joe
    I am using symlinks generated in PHP. They are generated when someone requests a download, and I want them to expire at the end of each day. The problem is, what if someone starts downloading a symlink 1 minute before the end of the day and then I delete the symlink while they are downloading it... My question is, to your knowledge will that individual downloading the symlink, right before I delete it, still be able to "download" the file? I am not worried about "resumable download" capability.. but will it make their download stop or break in some way?

    Read the article

  • Javascript indexOf() always returns -1

    - by Thomas
    I try to retrieve the index of en element in an array. This works perfectly var onCreate = function (event) { console.assert(markers[markerId] === undefined); var markerId = event.markerId; markers[markerId] = {}; var marker = markers[markerId]; // create the container object marker.object3d = new THREE.Object3D(); marker.object3d.matrixAutoUpdate = false; scene.add(marker.object3d); //UPDATE ARRAY HOLDING CURRENT MARKERS console.log("ON CREATE"); console.log("current detected markers: " + currentMarkers); var idx = currentMarkers.indexOf(markerId); // Find the index console.log("marker " + event.markerId + " has index: " + idx); if(idx==-1) // if does not exist currentMarkers.push(markerId); But this doesnt... var onDelete = function (event) { console.assert(markers[event.markerId] !== undefined); var markerId = event.markerId; //UPDATE ARRAY HOLDING CURRENT MARKERS console.log("ON DELETE"); console.log("current detected markers: " + currentMarkers); var idxx = currentMarkers.indexOf(markerId); // Find the index console.log("marker " + markerId + " has index: " + idxx); if(idxx != -1) {// if DOES exist currentMarkers.splice(idxx, 1); //Delete var idxxx = currentMarkersCoverChecked.indexOf(markerId); // Find the index if(idxxx == -1) // if does NOT exist, so if not being checked checkMarkerCovered(markerId); } onDeleteRandom(markerId); var marker = markers[markerId]; scene.remove(marker.object3d); delete markers[markerId]; Look at my console output: ON CREATE current detected markers: 2,1,4 marker 3 has index: -1 ON CREATE main.js:266 current detected markers: 2,1,4,3 marker 4 has index: 2 ON DELETE current detected markers: 2,1,4,3 marker 2 has index: -1 ON CREATE current detected markers: 2,1,4,3 marker 2 has index: 0 ON DELETE current detected markers: 2,1,4,3 marker 1 has index: -1

    Read the article

  • Getting values from another winform and passing it to current!

    - by klm9971
    Hello: I have 2 windows forms. The 1st one who gets active during start of the program has a button in which another 2nd windows form appears which has text field in which user type their name and HIT okay. Now in the 1st form I have a variable name: nameproccessed which takes the name from the second form. But the problem is my button which is in the 1st form has more functions besides taking name, how can I stop the flow of the compiler to take first the name from the second form and then process the rest execution of the function??? Here is the snippet of my code: //1st form //Class1 public string _nameProcessed = ""; private void btnGetSomething_Click(object sender, EventArgs e) { showdial(); //some more functionalities in this function!!! } private void showdial() { InputName inm = new InputName(); inm.Show(); } //2nd form //Class2 public string name; private void btnEnterName_Click(object sender, EventArgs e) { name = tbxName.Text; Class1 ict = new Class1(); ict._nameProcessed = name; this.Close(); } Now I want to take the 'name' from the second form put it on the _nameprocessed in the 1st form and then execute the rest of the function. How can I do that? Any help!

    Read the article

  • How do I change the class of an object to a subclass of its current class in C++?

    - by Jared P
    I have an array of pointers to a base class, so that I can make those pointers point to (different) subclasses of the base class, but still interact with them. (really only a couple of methods which I made virtual and overloaded) I'm wondering if I can avoid using the pointers, and instead just make an array of the base class, but have some way to set the class to the subclass of my choosing. I know there must be something there specifying the class, as it needs to use that to look up the function pointer for virtual methods. By the way, the subclasses all have the same ivars and layout. Note: the design is actually based on using a template argument instead of a variable, due to performance increases, so really the abstract base class is just the interface for the subclasses, which are all the same except for their compiled code. Thanks

    Read the article

  • Which are the current/emerging desktop development technologies worth looking into?

    - by heeboir
    Greetings, With all the existing development towards web development and emerging technologies in that area, I'm left wondering; what is a state of the art way to implement desktop applications in this day and age? If you were to start a new application of considerable size from scratch what technology would you invest your efforts in (focusing on cross platform portability, decent performance and interoperability with existing standards)? I've looked into the Adobe Air platform which appears quite impressive but seems rather limited to support a large application. Would something like Java/SWT still be the sensible choice? Do things like GWT fit the bill? Thanks P.S. I'm leaving my question a bit open-ended in an effort to gather diverse answers. Surely this a subjective matter and there is no right and wrong answer.

    Read the article

  • Determining if an Activity exists on the current device?

    - by stormin986
    Is there a way to check and see if an Activity exists on your device? If I have a youtube video link I want to specify it open in the YouTube PlayerActivity. However, I don't want to crash if for some reason they don't have it. Is there a way to check and see if the activity exists? I don't think I can catch the runtime exception since startActivity() doesn't throw it.

    Read the article

  • When the current toolbar is touched previous toolbar items are activated.

    - by srikanth rongali
    I have a UIToolBar *toolbar1. I have 3 buttons on the toolbar. And the tool bar is at the bottom of the view. The buttons are like library button, moreApps button, recordVideo button. If I touch the library button a new view(a UITableViewController) appears. I used presentModelViewController for it. If I touch moreApps button a new view (a UIViewController) appears and it loaded from http//. The recordButton touch gives another UIViewController view. When the moreApps button is touched and the view is loaded, it have the content from web and a UIToolBar *toolbar2 at the bottom the view. It has a refresh button and done button. The problem is when I touch the toolbar2 (not on the refresh button and done button) the previous views button are activated and corresponding views of previous buttons(library button, playVideo button) are loaded. I am not able to understand about this problem. Thank you.

    Read the article

  • Redirect to current view on error in asp.net mvc?

    - by Pandiya Chendur
    I use TempData["message"] which internally uses session.... It works for me but when i do a return RedirectToAction("Create"); my other values are not restored because i am redirecting to Create view... Any suggestion how to retain the values of textboxes in the view..... if (!regrep.registerUser(reg)) { TempData["message"] = string.Format("{0} already exists", reg.EmailId); return RedirectToAction("Create"); } else { return RedirectToAction("Index"); }

    Read the article

  • How to getting browser current locale preference using javascript?

    - by The Sheek Geek
    Does anyone know how to obtain the browser culture from firefox and google chrome using javascript? Note: This is an asp.net 3.5 web application. The requirement is to try and set the applications display culture based on the browser culture. I have found very few bits and pieces of information for the other browsers but they do not seem to work. I am able to get it in IE with the following snipit of code: var browserCulture = this.clientInformation.browserLanguage; Any info would be great!

    Read the article

  • How can this Ambient Context become null?

    - by Mark Seemann
    Can anyone help me explain how TimeProvider.Current can become null in the following class? public abstract class TimeProvider { private static TimeProvider current = DefaultTimeProvider.Instance; public static TimeProvider Current { get { return TimeProvider.current; } set { if (value == null) { throw new ArgumentNullException("value"); } TimeProvider.current = value; } } public abstract DateTime UtcNow { get; } public static void ResetToDefault() { TimeProvider.current = DefaultTimeProvider.Instance; } } Observations All unit tests that directly reference TimeProvider also invokes ResetToDefault() in their Fixture Teardown. There is no multithreaded code involved. Once in a while, one of the unit tests fail because TimeProvider.Current is null (NullReferenceException is thrown). This only happens when I run the entire suite, but not when I just run a single unit test, suggesting to me that there is some subtle test interdependence going on. It happens approximately once every five or six test runs. When a failure occurs, it seems to be occuring in the first executed tests that involves TimeProvider.Current. More than one test can fail, but only one fails in a given test run. FWIW, here's the DefaultTimeProvider class as well: public class DefaultTimeProvider : TimeProvider { private readonly static DefaultTimeProvider instance = new DefaultTimeProvider(); private DefaultTimeProvider() { } public override DateTime UtcNow { get { return DateTime.UtcNow; } } public static DefaultTimeProvider Instance { get { return DefaultTimeProvider.instance; } } } I suspect that there's some subtle interplay going on with static initialization where the runtime is actually allowed to access TimeProvider.Current before all static initialization has finished, but I can't quite put my finger on it. Any help is appreciated.

    Read the article

  • What's the current (as of April 2010) state of affairs regarding <object> vs <embed> in HTML?

    - by rvdm
    The age old question. <object> vs <embed>. From what I gather, <object> is the XHTML-compliant way of doing things, while <embed> is for legacy support. I'm currently building a Flash application that will contain a pre-made embedding code for users to copy and paste, and I'm wondering if it's feasible to simply dump the <embed> tag altogether. Which browsers would be unable to load my application if I gave my users an <object>-only embed code? Thanks :)

    Read the article

  • How to make hudson build only most current build.

    - by MikeU
    Question How do I setup Hudson so that if one person triggers a build, Hudson will put it on the queue and wait lets say 2 minutes, and during those 2 minutes if another build is triggered it will replace the older build on the queue with the new build? This way if there are 2 builds in those 2 minutes, Hudson will only perform the last build.

    Read the article

  • second time auto login to twitter using oauth php

    - by JAMES
    Any can tell me how to second time auto connect with twitter from my site. I did... the following CODE if(empty($outh_key_db)){ $token=$_SESSION['oauth_token'] ; $outh_secr_db=$_SESSION['oauth_token_secret']; $con = mysql_connect("localhost","rathin","xxxxxxxxx"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_twtbook", $con); mysql_query("UPDATE register SET outh_key = '".$token."', outh_secr='".$outh_secr_db."' WHERE userid='".$loguser_email."'"); mysql_close($con); This code save the outh_token and outh_tk_secret to my DB. But on second time log in to my site I passed the 'outh_token and outh_tk_secret' in session with username. The oauth not authenticate that.... Kindly suggest me.... to make aouth connect to twitter using oauth...if user once(1st time made the) connect twitter

    Read the article

  • can we assign object value to the label?

    - by user334294
    I have a label for that i have to assign object value which is returned by stored procedure.my code as following object returnvalue; SqlConnection con = new SqlConnection("Data Source=vela21; Initial Catalog=MilkDb;Integrated Security=True"); con.Open(); string sa; sa = textBox1.Text; SqlCommand cmd = new SqlCommand("custname", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("Cid", SqlDbType.Int).Value = sa; cmd.Parameters.Add("cname", SqlDbType.NVarChar, 20); cmd.Parameters["cname"].Direction = ParameterDirection.Output; returnvalue = cmd.ExecuteNonQuery(); label3.Text = Convert.ToString(returnvalue); con.Close(); can anyone help me? plz........

    Read the article

  • MySQLDB query not returning all rows

    - by RBK
    I am trying to do a simple fetch using MySQLDB in Python. I have 2 tables(Accounts & Products). I have to look up Accounts table, get acc_id from it & query the Products table using it. The Products tables has more than 10 rows. But when I run this code it randomly returns between 0 & 6 rows each time I run it. Here's the code snippet: # Set up connection con = mdb.connect('db.xxxxx.com', 'user', 'password', 'mydb') # Create cursor cur = con.cursor() # Execute query cur.execute("SELECT acc_id FROM Accounts WHERE ext_acc = '%s'" % account_num ) # account_num is alpha-numberic and is got from preceding part of the program # A tuple is returned, so get the 0th item from it acc_id = cur.fetchone()[0] print "account_id = ", acc_id # Close the cursor - I was not sure if I can reuse it cur.close() # Reopen the cursor cur = con.cursor() # Second query cur.execute("SELECT * FROM Products WHERE account_id = %d" % acc_id) keys = cur.fetchall() print cur.rowcount # This prints incorrect row count for key in keys: # Does not print all rows. Tried to directly print keys instead of iterating - same result :( print key # Closing the cursor & connection cur.close() con.close() The weird part is, I tried to step through the code using a debugger(PyDev on Eclipse) and it correctly gets all rows(both the value stored in the variable 'keys' as well as console output are correct). I am sure my DB has correct data since I ran the same SQL on MySQL console & got the correct result. Just to be sure I was not improperly closing the connection, I tried using with con instead of manually closing the connection and it's the same result. I did RTFM but I couldn't find much in it to help me with this issue. Where am I going wrong? Thank you. EDIT: I noticed another weird thing now. In the line cur.execute("SELECT * FROM Products WHERE account_id = %d" % acc_id), I hard-coded the acc_id value, i.e made it cur.execute("SELECT * FROM Products WHERE account_id = %d" % 322) and it returns all rows

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >