Local SQL Database & Labview communicat​ion

I created an sql database with sql server 2008 R2. I wish to be able to insert data to this database locally. Can someone please tell me if this can be done, and if it is possible, could someone give me the steps I have to follow?
Thanks.
Solved!
Go to Solution.

Another source of information would be a 3 part series on databases (check the link in my signature). The process is largely the same regardless of the DBMS you are accessing.
With SQL Server you will need a user I'd and password. Did you install the SQL Server yourself?
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • Connecting to local SQL database

    I have tried everything to connect to a SQL database which is
    located on the same machine I'm using for development. Is there any
    special way of doing this. I tried to create a new connection in
    every way possible and I can't seem to be able to establish a
    connection. i would appreciate your input with this problem.
    Thank you,
    Marequi

    And posting your connection string would be helpful.
    Nancy Gill
    Adobe Community Expert
    BLOG:
    http://www.dmxwishes.com/blog.asp
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
    A Beginner's
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "David Alcala - Adobe" <[email protected]>
    wrote in message
    news:efe94f$cia$[email protected]..
    > Are you using MS SQL Server? If so, what version?
    >
    > What server model are you using (ASP, ColdFusion, PHP,
    etc.)?
    >
    > How have you filled out the DW database connection
    dialog box so far?
    >
    > What error(s) are you seeing? Is the error in DW or in
    the browser?
    >
    > --
    > David Alcala
    > Adobe Product Support
    >

  • Siemens S7 300 PLC and Labview Communicat​ion

    Hi,
    I am attempting to communicate between Labview 7 and a Siemens S7 300 (CPU 314) PLC. I would prefer the communication to be over Ethernet or RS 232. Could you help me out with this implementation and let me know what additional hardware/software I may require for doing this.
    Thanks,
    Shameek

    Shameek wrote:
    I am using a CP-343 communications processor to connect the S7 300 to industrial ethernet.
    Now can I commnicate directly from Labview to the PLC?
    I still havent figured out where the OPC server comes in and whether it is an option or a necessity.
    Using OPC is an option.
    Siemens has an the add-on ($$) library/FB  that includes code for enabling Modbus communication with S7 300 CPUs. I've never used it, but info is here.
    <snip>
    Our solution
    With its MODBUS function block (FB) and the CP343-1 and CP443-1 SIMATIC S7 communications processors, Siemens can supply a proven solution for the integration of SIMATIC automation systems into other system landscapes. This function block enables data to be exchanged easily between MODBUS-compatible devices from different manufacturers and SIMATIC S7 stations from S7-300 and S7-400 systems.
    </snip>
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."

  • Labview : Communicat​ion série avec un périphériq​ue

    Bonjour,
    Sous Labview, j'essaie de communiquer via un port série à un périphérique. En parallèle, j'essaie de recevoir et d'envoyer des données. Je voudrais me placer en mode écoute (Activer la réception sur ce port : Visa read) puis envoyer une commande (Visa write). De ce fait, en se plaçant en écoute avant l'envoie de la commande, je suis sûr de recevoir la réponse du périphérique.
    Je veux donc envoyer un caractère tout en écoutant sur le même port com la réponse de mon périphérique (J'ai déjà un doute à ce sujet. Avec un port série, on peut lire et écrire en même temps ? )
    Mon problème est le suivant : En lançant ce programme sous Labview, il se place en écoute mais n'envoie pas le caractère de commande (montage en parallèle). Après le timeout de l'écoute (Visa read), le programme écrit bien le caractère (Visa write) comme un fontionnement série.
    Comment réaliser des tâches multiples en parallèle sur LabView ? Auriez-vous un exemple ou plus d'information à ce sujet ?
    Merci,
    Jérémy

    Bonjour,
    je confirme le fait qu'un UART ne peut pas travailler en "parallèle".
    Pour dialoguer avec un équipement, il faut envoyer une commande "Write" si besoin, pour que le produit te réponde.
    Tu récupères ensuite la réponse avec un "Read".
    Pour dimensionner le nombre de données à lire, plusieurs méthodes par la suite se présente à toi.
    - Attendre un certain temps : Interruption de la lecture sur timeout
    - Attendre un caractère de terminaison \A : 0xD par défaut.
    - Lire un certain nombre d'octet : Utilisation du noeud de propriétés nbre de bytes sur la liaison fortmeent conseillé.
    Si après une manipulation simple, tu ne relies pas de données, n'hésites pas à mettre une temporisation de 100 ms entre ta requête et ton écoute, il n'est pas rare d'avoir des équipements avec un temps de réponse de l'ordre de 50ms sur port série (spécification présente dans la documentation de l'équipement en général).
    Bonne journée,
    Michael

  • Labview communicat​ion balance ohaus

    Bonjour,
    Je travaille sur labview 7.1 et je n'arrive pas à communiquer correctement avec ma balance (ohaus arc120).
    Pour comuniquer j'utilise un cable rs232 croisé que j'ai fabriqué à partir d'un cable droit et un adaptateur usb/rs232.
    Lorsque je récupère les données de la balance via le bouton print de la balance, tout marche, j'ai la bonne valeur.
    Mais lorsque je la commande avec le pc, je n'ai pas toujours de signal. Lorsque j'en ai un, la valeur que je recois est éronnée. le nombre d'octets lu n'est pas constant et il y à des erreurs de cadrage: il manque une partie de la valeur (ex: 2,3g au lieu de 2,83g) ou m'indique totalement autre chose ( caractères spéciaux, lettres...)
    De plus je ne recois aucun signal si dans mon VI je ne répète pas 7 fois l'instruction écrire dans une boucle. Pour la tare c'est pareil, je dois répété l'instruction 5 fois.
    Pour réussir à écrire puis à lire il faut que j'ouvre un session visas pour écrire, que je la ferme, puis que j'en ouvre une nouvelle pour lire. Sinon il n'écrit pas.
    J'ai aussi essayé de communiqué directement en rs232. je recois la bonne valeur en appyuant sur le bouton print, mais je n'arrive pas commander la balance.
    J'ai vérifié les paramètres de transmissions, ils sont correctes.
    Pouvez-vous m'aider ?
    Merci beaucoup
    Cordialement
    Solved!
    Go to Solution.
    Attachments:
    arc120.pdf ‏129 KB
    balance avec deux sessions visas.vi ‏129 KB
    capture d'écran.doc ‏79 KB

    Try this PIN out for RS232 cable :
    Below are the two cable configurations that will work with 9 pin and 25 pin serial ports. You will notice that pins 2 and 3 are not crossed in the 9 pin but are in the 25 pin. In any case pins 5 and 6 have to be shorted at the balance end of the cable. One cable type will work with both balances.
    Ohaus Part number - AS017-09 Used with AP, AS, C, CT, E, G, GT, I5, TP, TS, MB200, Adventurer, Explorer, Voyager, Navigator and Scout.
    Cable - balance to PC
    9 pin(F) to 9 pin(F)
    Balance pin -----to----- PC pin
    PIN 2 (TXD) -----to----- PIN 2 (RXD
    ) PIN 3 (RXD) -----to----- PIN 3 (TXD)
    PIN 7 (GND) -----to----- PIN 5 (GND)
    For balances other than Adventurer pins 5 & 6 must be shorted together at the balance and NOT connected to the computer. This is not required in the Adventurer balances.
    CLA 2014
    CCVID 2014

  • Working with local SQL databases in AIR

    This question was posted in response to the following article: http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118676a5497-7fb4.html

    Hi Randy,
    It is from the retrieving data article.
    The first error that I got was
    1120: Access of undefined property conn.    DatabaseTest.mxml   
    /DatabaseTest/src    line 16    Flex Problem
    I then declared a variable for conn and received the following error as
    the app started to run.
    Error: Error #3109: Operation is not permitted when the
    SQLStatement.sqlConnection property is not set.
         at Error$/throwError()
         at flash.data::SQLStatement/checkAllowed()
         at flash.data::SQLStatement/checkReady()
         at flash.data::SQLStatement/execute()
         at DatabaseTest/init()[C:\Users\Neil\Adobe Flash Builder
    4.6\DatabaseTest\src\DatabaseTest.mxml:28]
         at
    DatabaseTest/___DatabaseTest_WindowedApplication1_creationComplete()[C:\Users\Neil\Adobe
    Flash Builder 4.6\DatabaseTest\src\DatabaseTest.mxml:2]
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at
    mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\ UIComponent.as:13152]
         at mx.core::UIComponent/set
    initialized()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:1818]
         at
    mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:842]
         at
    mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects\ framework\src\mx\managers\LayoutManager.as:1180]
    Neil
    [email protected]

  • How to create an SQL Database using LabVIEW??

    Hi all,
    I have been using LabVIEW for quite a long time but now I am doing something which I am totally new to. I have a VI which gives out a table as output. What I am trying to do is, I want to create an SQL databse and save this table in the database and I want to pass the value of this table to the SQL Database once in  every 24 hours. As I dont have any knowledge of My SQL I am totally stuck.
    Can anyone help me by telling me how to do this.?? An example code will be well appreciated.
    Regards,
    Nitz..

    Hi Nitzz,
    what have you done and where do you have problems? Did you make a search here in the forum?
    http://forums.ni.com/t5/forums/searchpage/tab/message?q=create+database#message-list
    Mike

  • SQL ENTERPRISE: The edition of Reporting Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database

    The error below makes absolutely no sense! I'm using Enterprise Core...yet I'm being told I can't use remote data sources:
    w3wp!library!8!03/05/2015-19:08:48:: i INFO: Catalog SQL Server Edition = EnterpriseCore
    w3wp!library!8!03/05/2015-19:08:48:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: , Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "The edition of Reporting
    Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database." is not supported in this edition of Reporting Services.;
    Really? This totally contradicts the documentation found here:
    https://msdn.microsoft.com/en-us/library/ms157285(v=sql.110).aspx
    That article says remote connections are completely supported.
    ARGH! Why does this have to be so difficult to setup?!?

    Hi jeffoliver1000,
    According to your description, you are using Enterprise Core edition and you are prompted that you can’t use remote data sources.
    In your scenario, we neither ignore your point nor be doubt with what you say. But actually we have met the case before that even though the SQL Server engine is Enterprise but the reporting services is still standard. So I would recommend you to find the
    actual edition of reporting services you are using. You can find Reporting Services starting SKU in the Reporting Service logs ( default location: C:\Program Files\Microsoft SQL Server\<instance name>\Reporting Services\LogFiles). For more information,
    please refer to the similar thread below:
    https://social.technet.microsoft.com/Forums/en-US/f98c2f3e-1a30-4993-ab41-acbc5014f92e/data-driven-subscription-button-not-displayed?forum=sqlreportingservices
    By the way, have you installed the other SQL Server edition before?
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Assign locals from SQL-database

    How to assign locals from SQL-database and how to use locals in SQL-statement.

    There's a shipping example called WritingAndReadingTableData.seq (in v2.0 anyway) that should help. In the example, a Data Operation of Get, reads a column value and writes it to a local variable. You can insert a local variable into the SQL statement that you create in the Open SQL Statement step type. In the above example, there's the statement
    "SELECT TEST_TABLE.COL_COUNTER, TEST_TABLE.COL_STRING, TEST_TABLE.COL_INTEGER, TEST_TABLE.COL_DOUBLE, TEST_TABLE.COL_CURRENCY, TEST_TABLE.COL_BOOLEAN, TEST_TABLE.COL_DATE FROM TEST_TABLE"
    If you had a local variable called TableName and value of "TEST_TABLE" assinged to it, the statement could just as easily be
    "SELECT TEST_TABLE.COL_COUNTER, TEST_TABLE.COL_STRING, TEST_TABLE.COL_INTEGER, TEST_TABLE.COL_DOUB
    LE, TEST_TABLE.COL_CURRENCY, TEST_TABLE.COL_BOOLEAN, TEST_TABLE.COL_DATE FROM " + locals.TableName

  • The feature: "The edition of Reporting Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database." is not supported in this edition of Reporting Services.

    Hello all,
    I have SQL express 2014 advance edition installed ..
    and i am connecting SQl server 2008 r2 instance which is in network 
    while creating datasource in Reportserver which has Express installed ..
    got this error ..
    please help me how to connect to remote server
    Dilip Patil..

    Error message says it all.
    With SQL Express, Data source should be local SQL DB.
    With SQL Enterprise, Standard, BI edition, you can create Data soruce which are hosted on other servers.
    Please refer similar thread:
    https://social.msdn.microsoft.com/Forums/en-US/c0468e3f-bad7-47a7-a695-75c13762280a/the-feature-the-edition-of-reporting-services-that-you-are-using-requires-that-you-use-local-sql?forum=sqlreportingservices
    Cheers,
    Vaibhav Chaudhari
    [MCTS],
    [MCP]

  • Image path not storing in sql database

    Hello,
    I have read here on the forum how to upload an image to server and store path in  your database, the image uploads correctly to the correct folder on my server but the image path does not get stored on my sql database (not local hosting). I receive the error: The file has been uploaded, and your information has been added to the directory. Column 'image' cannot be null.
    My database has the following columns:
    id
    datum
    image
    sectie
    My code is as follows:
    <?php require_once('Connections/dbTroch.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_dbTroch, $dbTroch);
    $query_rs_aanbod = "SELECT * FROM tblSlideshow ORDER BY id ASC";
    $rs_aanbod = mysql_query($query_rs_aanbod, $dbTroch) or die(mysql_error());
    $row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
    $totalRows_rs_aanbod = mysql_num_rows($rs_aanbod);
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    $target = "images/slides/";  //This is the directory where images will be saved// 
    $target = $target . basename( $_FILES['image']['name']); //change the image and name to whatever your database fields are called//
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "add-photos-aanbod")) {
      $insertSQL = sprintf("INSERT INTO tblSlideshow (image, sectie) VALUES (%s, %s)",
                           GetSQLValueString($_POST['file'], "text"),
                           GetSQLValueString($_FILES['image']['name'], "text"));
    //This code writes the photo to the server//
    if(move_uploaded_file($_FILES['image']['tmp_name'], $target))
    //And confirms it has worked//
    echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
    else {
    //Gives error if not correct//
    echo "Sorry, there was a problem uploading your file.";
      mysql_select_db($database_dbTroch, $dbTroch);
      $Result1 = mysql_query($insertSQL, $dbTroch) or die(mysql_error());
    ?>
    <!doctype html>
    <html>
    <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Troch Project Solutions - Admin - Toevoegen</title>
      <link rel="stylesheet" href="css/foundation.css" />
      <link rel="stylesheet" href="css/layout.css" />
      <!-- Fonts
      ================================================== -->
      <script type="text/javascript" src="//use.typekit.net/vob8gxg.js"></script>
      <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
      <!-- jQuery
      ================================================== -->
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
      <script src="js/vendor/modernizr.js"></script>
    </head>
    <body>
        <div class="row">
          <div class="large-8 medium-8 small-8 large-centered medium-centered small-centered columns intro">
              <h2 class="subheader text-center">Admin</h2>
              <p><a>Log uit</a></p>
              <p><a href="admin.php">Terug naar Admin menu</a>
              <h4>image toevoegen naar aanbod slideshows:</h4>
              <form action="<?php echo $row_rs_aanbod['']; ?>" method="POST" name="add-photos-aanbod" id="add-photos-aanbod" enctype="multipart/form-data">
              <table>
                    <tbody>
                         <tr>
                              <td><label for="image">Kies foto:</label></td>
                              <td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
                        <tr>
                              <td>Sectie:</td>
                              <td><select name="sectie" id="sectie" option value="sectie">
                                <?php
    do { 
    ?>
                                <option value="<?php echo $row_rs_aanbod['sectie']?>"><?php echo $row_rs_aanbod['sectie']?></option>
                                <?php
    } while ($row_rs_aanbod = mysql_fetch_assoc($rs_aanbod));
      $rows = mysql_num_rows($rs_aanbod);
      if($rows > 0) {
          mysql_data_seek($rs_aanbod, 0);
          $row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
    ?>
                              </select></td> 
                        </tr>
                        <tr>
                            <td><input type="Submit" name="Add" id="add" value="Toevoegen" /></td>
                        </tr>
                </tbody>
            </table>
            <input type="hidden" name="MM_insert" value="add-photos-aanbod" />
        </form>
          </div><!-- end large-8 -->
        </div><!-- end row -->
    <script src="js/vendor/jquery.js"></script>
    <script src="/js/vendor/fastclick.js"></script>
    <script src="js/foundation.min.js"></script>
    <script>
                $(document).foundation();
            </script>
    </body>
    </html>
    <?php
    mysql_free_result($rs_aanbod);
    ?>
    I cannot work out what is wrong and I would appreciate any help on this. Thanks

    Your form field and array variable names do not match
    <td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
    GetSQLValueString($_POST['file'], "text"),

  • Intermittant (not constant) SQL database ShareWebDb login failed events 3760 and 2424

    My Sharepoint 3.0 services that were bundled with SBS 2008 appear to be working fine. Companyweb, etc, all work w/o issue, so I don't want to take violent action, but these errors seem to be accellerating so I would love to know if there is a known
    solution.
    I typically receive the following (these are in reverse time order, latest at the top, just as they appear in the event log):
    Error Event ID: 3760 SQL Database 'ShareWebDb' on SQL Server instance 'np:\\.\pipe\MSSQL$Microsoft##SSEE\sql\query' not found. Additional error information from SQL Server is included below. Cannot open database "ShareWebDb" requested
    by the login. The login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
    one second earlier:Error Event ID: 2424 The update cannot be started because the content sources cannot be accessed. Fix the errors and try the update again. Context: Application 'Search', Catalog 'index file
    on the search server Search'
    Information Event ID: 18456 No description, here is the Details:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider
    Name="MSSQL$MICROSOFT##SSEE" />
    <EventID Qualifiers="49152">18456</EventID>
    <Level>0</Level>
    <Task>4</Task>
    <Keywords>0x90000000000000</Keywords>
    <TimeCreated
    SystemTime="2010-11-12T18:35:06.000Z" />
    <EventRecordID>491461</EventRecordID>
    <Channel>Application</Channel>
    <Computer>myserver.mydomain.local</Computer>
    <Security
    UserID="S-1-5-20" />
    </System>
    <EventData>
    <Data>NT AUTHORITY\NETWORK SERVICE</Data>
    <Data>[CLIENT: <named pipe>]</Data>
    <Binary>184800000E000000170000005000450054003300310030005C004D004900430052004F0053004F00460054002300230053005300450045000000070000006D00610073007400650072000000</Binary>
    </EventData>
    </Event>
    Two seconds earlier
    Information Event ID 17137 No description, here is the Details:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider
    Name="MSSQL$MICROSOFT##SSEE" />
    <EventID Qualifiers="16384">17137</EventID>
    <Level>4</Level>
    <Task>2</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated
    SystemTime="2010-11-12T18:35:04.000Z" />
    <EventRecordID>491460</EventRecordID>
    <Channel>Application</Channel>
    <Computer>mysever.mydomain.local</Computer>
    <Security
    UserID="S-1-5-20" />
    </System>
    <EventData>
    <Data>ShareWebDb</Data>
    <Binary>F14200000A000000170000005000450054003300310030005C004D004900430052004F0053004F00460054002300230053005300450045000000070000006D00610073007400650072000000</Binary>
    </EventData>
    </Event>
    I get more 3760 errors than 2424's. However, the
    2424's do seem to usually correspond to a 3760 18456 17137 occurance and the
    3760 are always preceeded by 18456 17137. I was getting one or two sets a day, lately that has increased to 5 or 10.
    I've done a lot of
    web research on Sharepoint Errors 3760 and
    2424 and I see a number of people are experiencing the the same issue. Most of what I've come across for solutions do not apply, since errors are intermittent, not chronic and my public remote URL has already been added
    to BackConnectionHostNames as per:
    http://blogs.technet.com/b/sbs/archive/2009/08/05/sharepoint-services-3-search-event-errors-after-an-sbs-2008-update-rollup.aspx
    I installed the SQL Server Management Studio Express so I could try to track down the permissions on this database. I see the SQL server instance, MYSERVER\Microsoft##ssee, and it shows as running, but when I try to connect to it I get the following
    error: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote
    connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)" I'm assuming that is because I don't have access permission for that internal database.
    I don't see any errors in the event log related to failed logins or any errors at all from the SQL server, but there are the time matching informational entries right before the error events and lots of other 17137's and 2803's from MSSQL$Microsoft##ssee

    Thank you Kevin, that does seem to match my symptoms and I have made the change suggested. Just incase that page becomes unreachable by others, here is the part of the page that applies to this:
    Issue:
    =========
    Receive event error 3760 and 6398 on SBS 2008
    Cause:
    ==========
    Issue was caused by incorrect Auto Close option for ShareWebDb database
    Solution:
    ==========
    1. On the SBS 2008 server, click Start -> All Programs -> Microsoft SQL Server 2005, right click SQL Server Management Studio Express and choose run as administrator.
    NOTE: You must run it as administrator to perform steps below.
    2. In the Server Name box, type \\.\pipe\MSSQL$Microsoft##SSEE\sql\query, click connect.
    3. Expand Database node and right click the ShareWebDb then choose properties.
    4. Click Options in the left pane, in the right pane, please check whether the Auto Close option is set to True, if so, please change it to False.

  • Data doesn't come up in SQL database

    Hi,
    I have been trying add data to my local .mdf database through C#. My code executes successfully but the data doesn't come up when I view the table data through Server Explorer. My database is not read-only and I have set it to never copy the database. Here
    is my code:
    SqlConnection con = new SqlConnection(global::Quizz.Properties.Settings.Default.QAConnectionString);
                string sql = "INSERT INTO Old (Question, AnsOne, ansTwo, ansThree, Correct) VALUES (@Question, @AnsOne, @ansTwo, @ansThree, @Correct)";
                SqlCommand sqlcmd = new SqlCommand(sql,con);
                sqlcmd.Parameters.AddWithValue("@Question", questiontxtbox.Text.ToString());
                sqlcmd.Parameters.AddWithValue("@AnsOne", ans1textbox.Text.ToString());
                sqlcmd.Parameters.AddWithValue("@AnsTwo", ans2textbox.Text.ToString());
                sqlcmd.Parameters.AddWithValue("@AnsThree", ans3textbox.Text.ToString());
                sqlcmd.Parameters.AddWithValue("@Correct", selectedradio);
                con.Open();
                sqlcmd.ExecuteNonQuery();
                MessageBox.Show("success!");
    How do I solve this problem?

    If your result of "sqlcmd.ExecuteNonQuery();" >
    0 without any exceptions, I think you should try to see whether your local db is copied again each time. I mean you are dealling with a copy type of db instead of real one.
    If so, please:
    1) Please change the property by switching to the db and change the "Copy To Local" to false.
    2) Create an "App_Data" folder.
    3) Change your db connection string to this following:
    Server=.\SQLExpress;AttachDbFilename=|DataDirectory|\MyDataFile.mdf;Database=dbname;
    Trusted_Connection=Yes;
    For more about connection string, plz see: http://www.connectionstrings.com/sql-server/
    ASP.NET Forum
    Other Discussion Forums
    FreeRice Donate
    Issues to report
    Free Tech Books Search and Download

  • Updating array data in sql database

    HI,
    Im facing problems in updating array data in SQL database.
    As of now, i am able to write an "insert" query and insert array data in an image datatype field. Im using image datatype because the array size is very big(around 80,000 x and y values).
    Althoug inserting data is easy im unable to write a query to update this data.
    Referring to the help of SQL server and Labview database connectivity toolkit, i came across a method of accessing image datatype....using textpointers, which are 16 bit binary values and using the WRITETEXT function instead of the UPDATE function.
    but the problem im facing is that ive to pass the array as a 2d string array in the query as a result the updated array is retrieved in the form of a string a
    nd not as an array. how do I get over this problem?

    Hi Pavitra,
    I'm not very clear on how you have inserted the data into your application, but I do know that when you call the UPDATETEXT or WRITETEXT function you use the TEXTPOINTERS to point to the first location of a 1d array. So, depending on how you've stored the data, you may have problems updating your data if you're looking at it as a 1d array instead of how you originally formatted it. If you are able to successfully access the data as a 1d array, you can use the database variant to data type vi and pass in a string array constant for the data type. This will convert the variant datatype into whatever you specify. You may have to index the row and column of the variant (you receive a 2d array of variant) first before you convert. If possible, can yo
    u provide some more detail and maybe some example code of how you perform the insert and plan to do the update? I can probably give you a better solution if I know how you are formatting the data. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • How can I insert an image(JPG) into a SQL database?

    I have written an application to perform some tests in the lab.  After gathering the data I store it into a SQL Server.  I successfully managed to export all my raw numbers and calculations to the DB.  However I have not been able to export a screenshot of the Front panel.  I can write the screenshot to a JPG file just fine.  The problem is putting the image (binary data) into the DB.
    So from what work I've managed to do, two questions come to mind:
    1)  Is there a way to compress the screenshot, using standard JPG compression, without actually writing out to a file.  ie:  Just have a binary stream of the compressed image that I can write to the SQL database.
    2)  Even if I don't use compression, I can't write any kind of data that appears as an image.  What kind of data do I need to be writing from LabView to store it properly in an 'image' or 'binary' type field in a SQL database?  I am not looking for answer "binary data."  Nor do I want the answer that is stated in the Help file for the DB Connectivity Toolkit(type - Data Cluster).  What I need is to know what kind of conversions I need to do on the image data that comes out of the FP.GetScaledImage.
    I am using LabView 8.0 and have the Database connectivity toolkit.  We are running SQL Server 2000 and 2005.

    I also hit this limit.  In the end I just wrote the JPGs to disk, and stored the file path in the DB.  Not the ideal solution, I know.
    I'm trying to remember now, exactly what the problem was.  You're right to say the image data type should handle up to 2GB.  I think in the end, it was an issue of the LabView toolkit not playing well with newer versions of SQL Server, which have the image type.  Re-reading the error though, it sounds like it might be an issue with the ODBC driver.  FYI, 8KB used to be the max size for the largest types in SQL Server (I think binary in 2000).  I suspect this limit was coded into the driver or LabView, and can't handle the newer, larger types.
    That being said, the LabView DB toolkit was either written poorly or written a long time ago.  It has issues with generating SQL queries that have the proper quotes.  For example, if your column names have spaces in them, the toolkit will be unable to generate a valid query, without some modification of the toolkit *.vi's.  Images in a database is not a new concept and not new to me.  I've never used a language where it was more complicated or difficult to get working.  Unless you absolutely have to, I'd work out a way to just store the JPGs to disk, with the path in the DB.  Spending too much time on this defeats the purpose of using LabView.
    If NI decides to update the DB toolkit, then it might be worth giving it a try again.
    In case any NI people are reading this, this is a not so subtle hint that you need to update the DB toolkit to support modern DB features.  Especially, if NI is charging $1000 for it.

Maybe you are looking for