Apostrophe displays incorrectly in SQL database

MySQL, PHP, Dreamweaver CS4
I have a SQL database that has text fields. If the user enters text that includes an apostrophe (such as the word don't or it's), when the text is displayed on the website, the apostrophe is replaced by a small box. How can I get this character to display correctly? I had contacted Adobe support directly, and they said to post the question on DEVNET. I had posted this question a month ago, but have received no answers. So I am trying again.

The reason it's displayed as a small box is almost certainly because the user has pasted the text from a program like Word that uses "smart quotes". Depending on how your website is set up, it's likely that the smart quotes are not being encoded correctly.
The first thing to check is that all the pages in your website use UTF-8 encoding. If that doesn't fix the problem, you will need to filter the text before inserting it into the database to replace the smart quotes with ordinary ones. I don't have a handy snippet of code to do that, so see if the encoding sorts out the problem.

Similar Messages

  • Apostrophe displays incorrectly in text in PHP database field

    I have a PHP database with several text fields. If the text
    contains an apostrophe, the apostrophe displays as a small box
    on the web page. How can I tell Dreamweaver to display this character correctly?

    Hi KT,
    Thanks for the advice, but opening Safari in 32 Bit mode didn't help, also when I copy the text from safari in to text edit it looks the same. Text displays correctly on my macbook which has Safari 4 and 10.6.1 so I don't understand!!! Thanks again. Cheers, Mark

  • Displaying the data from a "LINQ to SQL database"

    I have created a LINQ to SQL database with a simple table/class with the following properties:
    Counter
    Subject
    Description
    About the Counter, how do I set the properties so it behaves like a "Counter". For each row I want it to automatically add new numbers like this:
    1 Subject1 Decsription1
    2 Subject2 Description2
    3 Subject3 Description3...and so on for every new data inserted.
    For now I have "Auto Generated Value=True" and "Primary Key=True". Is that the right way to go? What do I set for "Auto-Sync"? There are options like "Never, OnInsert, OnUpdate, Always".
    I believe I've manage to do the coding for the insert part:
    private void btnAddReminder_Click(object sender, RoutedEventArgs e)
    DataClasses1DataContext db = new DataClasses1DataContext("db");
    Reminders reminder = new Reminders();
    reminder.Subject = txtSubject.Text;
    reminder.Description = txtDescription.Text;
    db.Reminders.InsertOnSubmit(reminder);
    MessageBox.Show("Content added!");
    Now first of all, is there a way I can display the database content directly in Visual Studio so I can see if I've manage to add any content in the table? I haven't yet find a way so far.
    Second how do I get the content from the datatable row by row and display it in MainWindow.xaml? What would the code look like? For every row I would like it to be displayed like this:
    1. Subject1
    Description1
    2. Subject2
    Description2
    3. Subject3
    Description3
    Is it possible to display "1. Subject1" in a Label. It should be sort of a headline.
    Then would it be possible to display "Description1" in a TextBlock?
    The idea is that Subject along with the number should have a larger font size, and the Description shoud be a bit smaller font size.
     

    >>For now I have "Auto Generated Value=True" and "Primary Key=True". Is that the right way to go?
    Yes, this means that the database takes care of the actual incrementation for you which is perfectly fine and probably what you want.
    >>how do I get the content from the datatable row by row and display it in MainWindow.xaml
    You need to an ItemsControl that can render all items in a collection somewhere in the MainWindow, e.g.:
    <ItemsControl x:Name="ic">
    <ItemsControl.ItemTemplate>
    <DataTemplate>
    <StackPanel>
    <StackPanel Orientation="Horizontal" Margin="0 0 0 10">
    <TextBlock Text="{Binding Counter}"/>
    <TextBlock Text=". "/>
    <TextBlock Text="{Binding Subject}"/>
    </StackPanel>
    <TextBlock Text="{Binding Description}"/>
    </StackPanel>
    </DataTemplate>
    </ItemsControl.ItemTemplate>
    </ItemsControl>
    The ItemTemplate (DataTemplate) of the ItemsControl defines the appearance of each item in its ItemsSource collection, i.e. a Reminders object in your case.
    You then simply set the ItemsSource of the ItemsControl to the collection of Reminders object that you want to display in it in your code:
    private void btnAddReminder_Click(object sender, RoutedEventArgs e)
    DataClasses1DataContext db = new DataClasses1DataContext("db");
    Reminders reminder = new Reminders();
    reminder.Subject = txtSubject.Text;
    reminder.Description = txtDescription.Text;
    db.Reminders.InsertOnSubmit(reminder);
    MessageBox.Show("Content added!");
    ic.ItemsSource = db.Reminders;
    >>is there a way I can display the database content directly in Visual Studio so I can see if I've manage to add any content in the table?
    First of all, please don't ask several questions in the same thread. Second, this is not a WPF question. If you are using a service-based database, you could select data from it from the Server Explorer in Visual Studio:
    http://msdn.microsoft.com/en-us/library/vstudio/ms233763(v=vs.120).aspx. Otherwise you typically use SQL Sever Management Studio to query a database. For Visual Studio specific questions, please use the Visual Studio forums:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio%2Cvsarch%2Cvsdbg%2Cvstest%2Cvstfs%2Cvsdata%2Cvsappdev%2Cvisualbasic%2Cvisualcsharp%2Cvisualc
    Please remember to mark helpful posts as answer and/or helpful.

  • Display images from a SQL database

    I want to display images from a SQL database. The images are in a table under a specific column and are stored as a link to the image. How would I display the images from the column in LabVIEW?
    I'm using LabVIEW 2013 version 13 and SQL Server 2012
    Paul Power
    I have not lost my mind, it's backed up on a disk somewhere

    Hi PauldePaor,
    I hope you are well.
    Once you have pulled the data from the database into LabVIEW in a string form (or path), you can simply use the Read BMP File (Or jpg, png depending on the file type) VI.
    More information can be found here:
    http://digital.ni.com/public.nsf/allkb/02971A30F5D8FC6986256A0A004F11A0
    Kind Regards,
    Aidan H
    Applications Engineer
    National Instruments UK & Ireland

  • Displaying the ResultSet from and sql database into a java Table in the sam

    i seriously need help in displaying the contents of my sql database into a table im my java application when someone types a query into a field provided..
    thanks guys !!

    What kind of help do you need.
    Are you stuck at some point of your code?
    Is you code not working?
    Or do you want us to write the code?

  • 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.

  • UUT Result log in SQL database?

    Hello All
    I am facing a requirement where i want to log results of sequence execution[only the complete seq result and NOT step results] to SQL database BUT as and when the UUT_ID varies the entry should be made into a new column with the same name as UUT_ID. As of now whenever i execute a sequence with different UUT_ID, a new row gets added as a result.
    Please reply back with your suggestions asap, as this very urgent for me :-)
    Regards
    Nitin Goel

    But in my opinion, that's just a way to display the results - not a way to store the data. I also have thousands of test cases and tens of thousands of different UUT each month. Each UUT has a separate record (a unique row) and yet if I design a proper query and report format, I can show the results exactly like you have. The design of a relational database should not be the same as a report design, imho.
    A database is designed to have unlimited rows (dependent only on storage space). I'm not sure a db can have unlimited columns. That would be something you could check with your dba. Dynamically adding a new column and doing an update to an existing row would probaby be much slower than just doing an insert.

  • How do I show multiple rollover images on a page inserted dynamically (pulled out of a sql database

    How do I show multiple rollover images on a page inserted dynamically (pulled out of a sql database table) using Dreamweaver’s Repeat Region. Example: I have different products each one associated (through their productID) with two images (one that’s showing in the page and one for the rollover effect) that are pulled from a database using Dreamweaver’s Recordset. So I want to end up with a page containing row after row of images(one for every product).When moused over each image will reveal the second (rollover) image for the same product which in turn can be a link(the image itself ) that when clicked leads to a detailed page with more information about the product the image is associated with. To show row after row with images for the different products in the database table I am using Dreamweaver’s Insert Rollover Image command and then the  Repeat Region – I have no problem to complete the steps, to insert the image and the rollover one at once and set the paths so they are pulled dynamically depending on the productID they are associated with .I have also no problem to apply the Repeat Region so not only the first image associated with the first product in the table is shown but all of them-a routine and standard procedure when using the Repeat Region to dynamically generate and display multiple rows of data. However, when I preview the page the rollover effect is lost –the images are shown but when moused over the second  image does not  show. The problem is caused when the Repeat Region is applied-once again I am allowed to apply it but the rollover stops working, a kind of interference. ANY SOLLUTION PLEASE, ANY WORK AROUND.

    I gotta tell you, using multiple images for rollover effects is going to be a big challenge in your dynamic scenario. 
    If this were my product page, I would use thumbnails with a bit of CSS opacity or filters to desaturate and make them full opacity/color on mouse over.  Nice effect with much less bandwidth. Easily done globally with CSS code.
    Two examples:
    http://alt-web.com/GALLERY/GalleryTest.php
    http://alt-web.com/TEMPLATES/CSS-Semi-liq-photo-sheet.shtml
    Nancy O.

  • Using flash to display images from sql server or file system

    hello,
    what methods and parameters of the urlloader class we have to use to display images in a flash player if possible..
    also movie should update everytime a new image is added to a database or file
    the images can either be in a file system or in a sql database (if possible)
    does flash comes with an object of this type or we have to create it.
    regards,

    i responded to your duplicate message 4 days ago:
    is it possible to insert and retrieve images from sql server using actionscript.
    you'll need server-side script to query your database and you can use the flash urlloader class to call your script.
    also  is it possible to create a flash scrolling gallery based on images  stored in a database and everytime an image is added it is displayed in  the gallery.
    load the data using the urlloader class and  then load the images.  periodically query the database for new images if  there's no direct way for flash to know a new image was added.

  • How to show image in a datagridview cell called from a URL stored in an SQL database

    I am using Visual Studio 2008 creating a Windows Form to display a datagrid with real estate information. The SQL database record contains a dozen fields of text which I have no problem displaying. My problem is one of the columns contains
    a url which links to a picture on a remote third party server. I need to display a thumb nail picture on the grid row based on the stored url. When I edit the gridview column I see there is a "column type" setting and
    in the dropdown is DataGridViewImageColumn. I don't see any URL setting where I can bind the sql field to. 
    Any help would be greatly appreciated.

    Hi ikeni,
    I think you could do as below:
    1.Set the ColumnType as “DataGridViewImageColumn”
    2.For each row of the datagridview, and set the Value of datagridview cells like  “dataGridView1[2, 0].Value = Image.FromFile(@"\\1.168.1.1\C$\Users\Desktop\3.JPG")”
    You could turn to the links below for more information:
    setting an Image column in a datagrid view based on a value in the database c#
    https://social.msdn.microsoft.com/Forums/windows/en-US/62f5b477-5311-4de5-bc18-fbd29bbfc9e2/setting-an-image-column-in-a-datagrid-view-based-on-a-value-in-the-database-c?forum=winformsdatacontrols
    Check if file exists on remote server and various drive
    http://stackoverflow.com/questions/26432688/check-if-file-exists-on-remote-server-and-various-drive
    If you have any further questions, please feel free to post in this forum.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Need Help/Advice with Photo Web Gallery coming from SQL Database

    This is my first attempt at a database driven website. I assume what I am trying to accomplish should be fairly easy for more experienced but I am stuck at this point.
    First, let me explain what I am trying to accomplish.
    I want to create a thumbnail photo gallery displayed in columns and rows. I want to be able to hover over or click on the thumbnail image and have a lightbox script display the image over the thumb page. I am developing locally right now with intent to upload to the hosting site upon completion.
    I am developing with ASP vbScript pages. I have an SQL database where the paths to the image thumbnails and pictures are stored in a table. On the gallery page, I have created a div tag to hold my image recordset. Within this div, I have inserted 3 absolute positioned divs to hold the pictureID, the pictureName and the image inserted as a datasource. I then inserted the information from the bindings panel of my recordset. Last, I used a horizontal looper extension from Tom Muck to get the thumbnails to display in columns and rows. Everything works up to this point just fine.
    Now, I want to be able to hover or click on a thumnail image and have it displayed in a lightbox. I downloaded and used a javascript called Lightbox 2 which contains 3 javascript files and a css stylesheet. I inserted the files into the head tag like instructed to but could not get things to work properly. Here is where I need help. Currently, I am clicking on the thumbImage binding within the image Div and creating a link holder. I am then binding the larger pictureImage to it with the a.href selected in the bind to. I am then adding the command to call the lightbox javascript. Now, when I test my page, my thumbnail images do not show up (my alt text does in its place) but the links are in place and you can click on the alt text and it will return the correct larger image, but not in the lightbox, just in a new window with no styles.
    Am I going about this correctly? Can you use lightbox scripts with data-driven galleries? Does anybody have any suggestions of what I may be doing wrong or missing? Are there better ways to go about accomplishing this?
    Any help would be appreciated as this dynamic data thing has my head spinning. Although I know a database is needed to simplify the update and maintenance of the photos while allowing them to be searchable by keywords and tags also set up in the database.
    Thanks

    As I explained, I am developing locally a the moment. I will see about getting the databased moved up to the hosting server and then provide a link for an example.
    In the mean time, can you or anyone else explain a way that you would go about displaying an image thumbnail photo gallery laid out in rows / columns, with any lighbox script that would overlay the larger image over the existing page instead of opening a new browser window?
    I don't have to use the method I tried to describe.
    In all of the lightbox examples I have looked at thus far, they give instructions on how to append that javascript to a single static image or a group of static images, not images from a datasource. That is where I am getting confused.
    Don't know if this will help or not but please see code below:
    Javascript and CSS positioned in head tag
    <!--beginning of lightbox script with css -->
    <link href="CSS/lightbox.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/protype.js" type="text/javascript"></script>
    <script src="Scripts/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
    <script src="Scripts/lightbox.js" type="text/javascript"></script>
    <!--end of lightbox script with css -->
    Calling for javascript in the galleryimage div when hovering over thumbnail image
        <!--beginning of gallery div -->
        <div id="gallery">
          <p>
            <!--beginning of galleryImage div -->
          </p>
          <table width="400" border="0" align="center" id="galleryNav2">
            <tr>
              <td width="100" align="center"><% If MM_offset <> 0 Then %>
                  <a href="<%=MM_moveFirst%>">First</a>
              <% End If ' end MM_offset <> 0 %></td>
              <td width="100" align="center"><% If MM_offset <> 0 Then %>
                <a href="<%=MM_movePrev%>">Previous</a>
              <% End If ' end MM_offset <> 0 %></td>
              <td width="100" align="center"><% If Not MM_atTotal Then %>
                <a href="<%=MM_moveNext%>">Next</a>
              <% End If ' end Not MM_atTotal %></td>
              <td width="100" align="center"><% If Not MM_atTotal Then %>
                <a href="<%=MM_moveLast%>">Last</a>
              <% End If ' end Not MM_atTotal %></td>
            </tr>
          </table>
          <p> </p>
          <table align="center" id="HorzLooper">
            <%
    startrw = 0
    endrw = HLooper1__index
    numberColumns = 5
    numrows = 5
    while((numrows <> 0) AND (Not rs_ssfGallery.EOF))
    startrw = endrw + 1
    endrw = endrw + numberColumns
    %>
            <tr align="center" valign="top">
              <%
    While ((startrw <= endrw) AND (Not rs_ssfGallery.EOF))
    %>
              <td><div id="galleryImage">
                <div id="galleryThumb"><a href="images/pic/<%=(rs_ssfGallery.Fields.Item("picture_url").Value)%>"rel="lightbox"><img src="images/thumb/<%=(rs_ssfGallery.Fields.Item("thumb_url").Value)%>" alt="<%=(rs_ssfGallery.Fields.Item("alt_url").Value)%>" /></a></div>
                <div id="galleryImageID"><%=(rs_ssfGallery.Fields.Item("picture_ID").Value)%></div>
                <div id="galleryImageFamily"><%=(rs_ssfGallery.Fields.Item("family").Value)%></div>
              </div></td>
              <%
    startrw = startrw + 1
    rs_ssfGallery.MoveNext()
    Wend
    %>
            </tr>
            <%
    numrows=numrows-1
    Wend
    %>
          </table>
          <p> </p>
          <table width="400" border="0" align="center" id="galleryNav">
            <tr>
              <td width="100" align="center"><% If MM_offset <> 0 Then %>
                  <a href="<%=MM_moveFirst%>">First</a>
              <% End If ' end MM_offset <> 0 %></td>
              <td width="100" align="center"><% If MM_offset <> 0 Then %>
                  <a href="<%=MM_movePrev%>">Previous</a>
              <% End If ' end MM_offset <> 0 %></td>
              <td width="100" align="center"><% If Not MM_atTotal Then %>
                  <a href="<%=MM_moveNext%>">Next</a>
              <% End If ' end Not MM_atTotal %></td>
              <td width="100" align="center"><% If Not MM_atTotal Then %>
                  <a href="<%=MM_moveLast%>">Last</a>
              <% End If ' end Not MM_atTotal %></td>
            </tr>
          </table>
    <!--end of galleryImage div -->
        </div>
        <!--end of gallery div -->
    Thanks for any help or suggestions.

  • Inserting Timestamp into a SQL database

    I am having a problem inserting a timestamp into a Sql Database. I keep getting this error or a different on when i format the timestamp differently. In the following code the timestamp is not formated at all.
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '13'
    this is the sql statement that is executed
    insert into timesheet(IDNUM,TimeIn,TimeOut,HoursWorked) values (123 , 2005-07-15 13:20:06.062 , 2005-07-15 13:20:06.062 ,0)
    the code is as follows:
         <%
         try
                SimpleDateFormat test = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
                Timestamp stamp = new Timestamp(System.currentTimeMillis());
                java.util.Date date = new java.util.Date();
                String sql = "insert into timesheet(IDNUM,TimeIn,TimeOut,HoursWorked) values (" + session.getAttribute("IDNum") + " , " + stamp + " , " + stamp + " ,0)";
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                Connection cnxn = DriverManager.getConnection("jdbc:odbc:EmployeeSystem");
                Statement stmt = cnxn.createStatement();
                 stmt.execute(sql);
                response.sendRedirect("employee.jsp");
         catch(Exception dberr)
             SimpleDateFormat test = new SimpleDateFormat("yyyyMMddhhmm");
             Timestamp stamp = new Timestamp(System.currentTimeMillis());
             out.println(dberr);
             out.println("insert into timesheet(IDNUM,TimeIn,TimeOut,HoursWorked) values (" + session.getAttribute("IDNum") + " , " + stamp + " , " + stamp + " ,0)");
         %>please help.
    The reason that i need the timestamps in there is that i am creating a time clock program for my school that they can put on a intranet so thier hourly employees can use instead of the current manual system they use.

    even better would be to use prepared statements and set the fields via Timestamp objects.
    String sql = "insert into timesheet(IDNUM ,TimeIn ,TimeOut ,HoursWorked ) values (?,?,?,?)";
    Statement stmt = cnxn.prepareStatement(sql);
    int idNum = (Integer)session.getAttribute("IDNum").intValue();
    Timestamp stamp = new Timestamp(System.currentTimeMillis());
    stmt.setInt(1, idNum);
    stmt.setTimeStamp(2, stamp);
    stmt.setTimeStamp(3, stamp);
    stmt.setInt(4, 0);
    stmt.execute();It makes your code much more portable, as you don't have to worry about the database having a TO_DATE function with that syntax.
    Cheers,
    evnafets

  • Dynamic table pulled from SQL database, Need to Search

    My table results are not static, they are pulled into a
    dynamic table from a SQL database. Each table displays 10 records
    with an option at the bottom to display additional records
    (next/previous), for my query. I also have an option set up to
    allow users to click for a detail view of a record in the table. If
    the table data was static, I would be able to set up a search
    option and a results page for it, but I'm dealing with dynamic data
    on an .ASP page. I'd like to set up a search box to limit the
    records displayed in the table. I haven't found any code samples
    that are designed for dynamic data.
    Here is a copy of the code from my table.

    Hi,
    I think the code on this URL will get you the solution
    http://www.asp.happycodings.com/Array/code3.html
    Cheers,
    ~Maneet

  • Help Needed!! Working with SQL Databases

    Hi All,
    I'm currently working on an application that interfaces with an SQL database, and I seem to have ran into a roadblock.
    I have a multicolumn list box on my front panel which is filled in with data extracted from the database. On selecting any of the rows in the list box, another one is opened displaying another set of data extracted by a generated SQL query. At the moment I am only selecting one row at a time to view it's related data, but I want to expand such that I can select mutiple rows from the list box at a time and see all of their corresponding data.
    With only a single selection, I can pass the index value of the selection to an Index Array Function with the database as the other input and build my SQL statement.
    But with multiple selections, I imagine I would have to build an array on index values and use those as a reference to build the SQL statment. And I am not sure how exactly to go about doing that.
    Here is the code that I currently have working for a single selection from the list box.
    Any help is appreciated. Cheers.
    Solved!
    Go to Solution.

    tdog wrote:
    Hi All,
    I'm currently working on an application that interfaces with an SQL database, and I seem to have ran into a roadblock.
    I have a multicolumn list box on my front panel which is filled in with data extracted from the database. On selecting any of the rows in the list box, another one is opened displaying another set of data extracted by a generated SQL query. At the moment I am only selecting one row at a time to view it's related data, but I want to expand such that I can select mutiple rows from the list box at a time and see all of their corresponding data.
    With only a single selection, I can pass the index value of the selection to an Index Array Function with the database as the other input and build my SQL statement.
    But with multiple selections, I imagine I would have to build an array on index values and use those as a reference to build the SQL statment. And I am not sure how exactly to go about doing that.
    Here is the code that I currently have working for a single selection from the list box.
    Any help is appreciated. Cheers.
    Regarding building the array:
    I can see hat you multicolumn listbox has not multiselection enabled, and is limited to one or zero selected item at once. To enable multiselction; simply rightclick your multicolumn listbox and change your selection mode to support multiple selected items. The NewVal at the event structure should change from a single index number to a 1D array of indexed numbers. No coding needed. Then just retrive out all the items (since you know the indexes) and create the quiry. The quiry part I dont really know (long time no see SQL), but it looks like a for loop to create the string should do the trick?

  • The itemRenderer CheckBox of Datagrid displays incorrect sometime.

    The itemRenderer CheckBox of Datagrid displays incorrect
    sometime.
    A datagrid has a column:
    <mx:DataGridColumn headerText="selectMe" editable="true"
    dataField="_selected" itemRenderer="{new
    ClassFactory(mx.controls.CheckBox)}"
    rendererIsEditor="true" editorDataField="selected"/>
    There are serveral records which have been get from database.
    the records all are unchecked. after I checked some records , then
    refresh the data from database, the checkBoxs will display
    incorrect sometimes.
    any suggestion?
    thanks.

    It occured frequently. What can I do?

Maybe you are looking for

  • What is the correct sequence to link 3 Airport Express units in a WDS?

    I have 3 AE units set up in a WDS. I currently have unit #1 as a main base. Unit #2 is an extended base station. Unit #3 is a remote base station. I have unit #1 connected to the iMac for the internet on the first floor via an ethernet connection. It

  • Trying to upload pictures from and iPad on to a pdf form (Adobe FormsCentral)

    Im trying to upload pics from my iPad onto an pdf form also on my iPad. Is there a special code that I need?

  • Why can't I attach a link to my button?

    I can't for the life of me figure out how to add a link to the button at the very bottom of the page. When I select the button, and do "insert hyperlink" it just puts the link to the right of the button. http://www.webrevamps.com/promash/1b.html

  • Convert rdf to rex in batch

    Hello I have to convert many reports to .rex format for analysing. My Problem is (as described as solution in file format problem that a batch with the line FOR %%F in (*.rdf) DO rwcon60 userid=xy/yx@zz STYPE=RDFFILE BATCH=YES DTYPE=REXFILE SOURCE=%%

  • Problem to select path

    Hello, Have a problem with a file, which someone sent me. I could not select any path. Not in any way. I am a newbie. Some pathes are green some blue marked. Could someone help?