Search Results

Search found 17 results on 1 pages for 'szamdev'.

Page 1/1 | 1 

  • How to backup database (MS SQl Server 2008) in C# without using SMO (having proplems) ?

    - by SzamDev
    Hi I have this code and it is not working but I don't why? try { saveFileDialog1.Filter = "SQL Server database backup files|*.bak"; saveFileDialog1.Title = "Database Backup"; if (saveFileDialog1.ShowDialog() == DialogResult.OK) { SqlCommand bu2 = new SqlCommand(); SqlConnection s = new SqlConnection("Data Source=M1-PC;Initial Catalog=master;Integrated Security=True;Pooling=False"); bu2.CommandText = String.Format("BACKUP DATABASE LA TO DISK='{0}'", saveFileDialog1.FileName); s.Open(); bu2.ExecuteNonQuery(); s.Close(); MessageBox.Show("ok"); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } and I get this error : What is the proplem?

    Read the article

  • Need help with ConnectionString value in C#

    - by SzamDev
    Hi I have an idea and I want to apply it to my Application (C# .NET). When we connect to a DB (MS SQL Server 2008) in VS 2008, the ConnectionString saved in the Application Setting and it's a static varriable (no one can edit it unless you edit it inside VS 2008). I want a way to let my Application search for MS SQL Server and save it to Application Setting and use it to connect to my DB Programmatically. When my application start, the first thing to do is checking the ConnectionString if vaild, NOT Empty and test connection to MS SQL Server Successfully so if there is a proplem I think to show a window form to let the user enter some data like username and password for MS SQL Server 2008 Is there any way to do it?

    Read the article

  • How to get a list of unchecked checkboxes when submittimg a form?

    - by SzamDev
    Hi I have this code for example : $b = ""; while ($row = mysql_fetch_array($rows)) { if ($row['enabled'] == 1) { $b = "checked"; } else { $b = "": } echo ""; } When I execute this code, I will get a list of checkboxes, some of them are checked and others are not. I can use this code to get a list of checked checkboxes. if (isset($_POST['sub'])) { //check if form has been submitted or not $nam = $_POST['nam']; if (!empty($nam)) { foreach($nam as $k=>$val){ // proccess operation with checked checkboxes } } I need to know how I can get list of unckecked checkboxes after submitting the form. Thanks in advance.

    Read the article

  • How to get a list of unchecked checkboxes when submitting a form?

    - by SzamDev
    Hi I have this code for example : $b = ""; while ($row = mysql_fetch_array($rows)) { if ($row['enabled'] == 1) { $b = "checked"; } else { $b = "": } echo "<\input name='nam[$row[id]]' type='checkbox' value='$row[id]' $b /"; } When I execute this code, I will get a list of checkboxes, some of them are checked and others are not. I can use this code to get a list of checked checkboxes. if (isset($_POST['sub'])) { //check if form has been submitted or not $nam = $_POST['nam']; if (!empty($nam)) { foreach($nam as $k=>$val){ // proccess operation with checked checkboxes } } I need to know how I can get list of unckecked checkboxes after submitting the form. Thanks in advance.

    Read the article

  • How to automatically select the selected item in list menu after submitting the form?

    - by SzamDev
    Hi I have this code : <form id="form2" name="form2" method="post" action=""> <table dir="ltr" width="554" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="269" class="da"><div align="center"><span id="spryselect1"> <select onchange="form2.submit()" name="mpage" id="mpage"> <option selected="selected" value="no">-----------</option> <option value="medmo">Medmo.com</option> <option value="paris">Paris.com</option> <option value="imo">IMO.com</option> </select> </span></div></td> <td width="214" class="t_b">Select Website</td> </tr> </table> </form> When the user select a value, the form will automatically submit, I want the item that the user has selected to be selected after submitting the form. Because I am facing this proplem: The user select the first item (Medmo.com) - form submit - selected item will be "-------" I want this to happen : The user select the first item (Medmo.com) - form submit - selected item will be "Medmo.com" How I can do that? Thanks in Advance.

    Read the article

  • How to Merge two databases in one in SQL Server 2008?

    - by SzamDev
    Hi I have 2 PCs, each one of them has SQL Server 2008 installed on it and there is a database with data in it. I need a way that I can move data in my DB from this SQL Server to another one (another PC which has the same DB) move data from one PC to another one - There is one problem, the ID column, because each DB in my 2 PCs has data in it so this column counts from 1,2,3,....... ( data will be conflict with other data in my DB ) Is there any way to solve my problem and move data successfully?

    Read the article

  • I need a mechanism for locating SQL server instances

    - by SzamDev
    Hi I have an idea and I want to apply it to my Application (C# .NET). When we connect to a DB (MS SQL Server 2008) in VS 2008, the ConnectionString saved in the Application Setting and it's a static varriable (no one can edit it unless you edit it inside VS 2008). I want a way to let my Application search for MS SQL Server and save it to Application Setting and use it to connect to my DB Programmatically. When my application start, the first thing to do is checking the ConnectionString if vaild, NOT Empty and test connection to MS SQL Server Successfully so if there is a proplem I think to show a window form to let the user enter some data like username and password for MS SQL Server 2008 Is there any way to do it?

    Read the article

  • How to control the text inside DIV tag by not allowing the text to be increased?

    - by SzamDev
    Hi I have this CSS code : #d_image { float: left; width: 320px; margin-top: 20px; margin-left: 25px; } #d_coll { width: 320px; float: left; } #n_div { width: 240px; text-align: right; padding-top: 10px; float: left; padding-right: 10px; padding-left: 0px; } #n_text { text-align: right; float: left; clear: both; } #im { height: 50px; width: 50px; float: right; padding-right: 15px; } #n_col { clear: both; width: 310px; float: right; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #CCC; padding-bottom: 10px; } #n_tittle { text-decoration: none; text-align: right; padding-bottom: 10px; padding-right: 15px; } #n_tittle a { text-decoration: none; text-align: right; color: #1C60B3; } #n_tittle a:hover { text-decoration: underline; text-align: right; color: #FF0000; } I have this HTML code : <div id="d_coll"> <div id="d_image">sample text</div> <div id="n_text">Here will be photo</div> </div> <div id="n_col"> <div id="n_tittle">sample text</div> <div id="im">small photo will be here</div> <div id="n_div">long text</div> </div> I have proplem in n_div, if I put in it a very long text it will be under im div and I want the text inside it to go to new line when it reach the end because the image should be to the right of the text in im div . How I can do that? Thanks in Advance.

    Read the article

  • How to get a list of unrepeatable date from my db in PHP?

    - by SzamDev
    Hi in my db there are 5 fields (id, list_date, amount, total, m_from) and contain data, for example : 1 - 1/1/2010 - 10 - 50 - 'example111' 1 - 1/1/2010 - 10 - 50 - 'example111' 1 - 1/4/2010 - 10 - 50 - 'example154 1 - 1/1/2010 - 10 - 50 - 'example111' 1 - 1/5/2010 - 10 - 50 - 'test' I need to know how I can get dates from list_date but without repeatable dates like '1/1/2010, 1/5/2010, 1/4/2010' Thanks in Advance.

    Read the article

  • How to convert all images to JPG format in PHP?

    - by SzamDev
    I am developing a website in PHP that let the user to upload images and then let him to decide how the image should be using jQuery - PHP integeration to select the area that wanted to be the picture and then click the crop button to crop it and save it. The problem that I am facing is that not all images type are good to crop and save so I noticed that the easy solution for it to convert the image to JPG and then let the user to crop it because it's the easy way to do it in JPG format. How I can do it? Is this the best solution for images types problem?

    Read the article

  • How to Merge two databases in one in MS SQL Server 2008?

    - by SzamDev
    Hi I have 2 PCs, each one of them has MS SQL Server 2008 installed on it and there is a database with data in it. I need a way that I can move data in my DB from this MS SQL Server to another one (another PC which has the same DB) move data from one PC to another one - There is one proplem, the ID column, because each DB in my 2 PCs has data in it so this column counts from 1,2,3,....... ( data will be conflict with other data in my DB ) Is there any way to solve my proplem and move data successfully?

    Read the article

  • jQuery code .val(); not working in FF

    - by SzamDev
    Hi I have this code function calculateTotal() { var total = 0; $(".quantity").each(function() { if (!isNaN(this.value) && this.value.length != 0) { total += parseFloat(this.value); } }); $("#total_quantity").val(total); } <input onchange="calculateTotal();" name="sol1" type="text" class="result_form_textbox_small quantity" id="sol1" /> <input name="total_quantity" type="text" class="result_form_textbox_small" id="total_quantity" /> This code is working in IE very good but it's not working in FF. What is the proplem? Thanks in advance.

    Read the article

1