User Profile

Collapse

Profile Sidebar

Collapse
MiziaQ
MiziaQ
Last Activity: Dec 9 '10, 02:57 PM
Joined: Nov 9 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • MiziaQ
    started a topic GridView: Binding Database Fields to Textboxes

    GridView: Binding Database Fields to Textboxes

    I am connecting to a database table to pass values to textboxes in a gridview. I get the following error:

    Object reference not set to an instance of an object.

    Thanks in advance for your help!

    Code:
    private void ReadProjects()
        {
    
            SqlDataReader rdr;
    
            SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
    ...
    See more | Go to post

  • MiziaQ
    started a topic Retrieve last MemberID and insert record

    Retrieve last MemberID and insert record

    Hi, I am using the code below to find the last MemberID in the table and insert a record. The code is not working, I am getting the following error:

    Exception Details: System.IndexOut OfRangeExceptio n: MemberID

    Code:
    protected void ButtonSave_Click(object sender, EventArgs e)
        {
    
            int rowIndex = 0;
    
            StringCollection sc = new StringCollection();
    ...
    See more | Go to post

  • MiziaQ
    replied to User views and QueryString
    Thanks, I got the QueryString working. The only problem now is that I get redirected to the companyadmin page even if the company role is not 'Admin'. Do you know how I can fix that? Thanks!
    See more | Go to post

    Leave a comment:


  • MiziaQ
    started a topic User views and QueryString

    User views and QueryString

    HI, I am trying to redirect users to the appropriate page based on the company role stored in the database. I have written the following code, but it doesn't seem to work. If the role is anything other than 'Admin', companyuser.asp x should load. Also, I am trying to append the user ID and username to the URL. At the moment it is hardcoded. Does anyone know how to obtain this from the db? Thanks in advance for your help!

    Code:
    protected
    ...
    See more | Go to post

  • That got rid of the two errors - thanks! However, I now get a new error message.

    'No overload for 'btnLogin_Authe nticate' matches delegate 'System.EventHa ndler'. Any ideas?

    I appreciate it!
    See more | Go to post

    Leave a comment:


  • MiziaQ
    started a topic 'The name does not exist in the current context'

    'The name does not exist in the current context'

    I'm trying to authenticate the user login in c#. I get the following 2 errors: 'the name 'login_username ' does not exist in the current context' and 'the name 'login_password ' does not exist in the current context'.

    index.aspx

    Code:
    <tr>
    			            <td>&nbsp;</td>
    			            <td>
    			                <asp:TextBox ID="login_username" runat="server"
    ...
    See more | Go to post

  • MiziaQ
    started a topic JavaScript Alert Servlet
    in Java

    JavaScript Alert Servlet

    Can someone have a look at this code? I'm trying to display a message stored in messages.proper ties in a javascript alert box. Right now nothing happens:

    String message = "";
    InputStream inputStream = getClass().getR esourceAsStream ("/messages.proper ties");
    Properties props = new Properties();
    props.load(inpu tStream);

    response.setCon tentType("text/html");...
    See more | Go to post

  • MiziaQ
    started a topic ObjectOutputStream
    in Java

    ObjectOutputStream

    I have this code to write to a file. However, this only saves one entry.
    How can I save multiple entries, each saved in separate lines ?
    At this point the output in the .txt file is strange:

    ’ t Peter|t Pan|t 01/09/67|t 098 1456789|t 18-Mar-2009|t Male Surgical Wardt 

    I need the text to be clear in order to read it in a JTable


    public void writeTable() {

    ...
    See more | Go to post

  • MiziaQ
    started a topic Random Access Saving
    in Java

    Random Access Saving

    I'm trying to save fixed length data into a random access file. Right now it works, but saves everything in one, continuous line. How can save every new entry in a new line. Also, I want to separate fields with a "|" character in order to read the file into a JTable.

    i.e:

    Id|Name|City|Ph one
    102|Beth Reiser|New York|(212)55587 25
    111|Dylan Ricci|Syracuse| (315)5554486
    116|Brian Gugliuzza|Mamar oneck|(914)5553 817...
    See more | Go to post

  • MiziaQ
    started a topic Random Access Saving

    Random Access Saving

    I'm trying to save fixed length data into a random access file. Right now it works,
    but saves everything in one, continuous line. How can save every new entry in
    a new line. Also, I want to separate fields with a "|" character in order to read the file into a JTable.

    i.e:

    Id|Name|City|Ph one
    102|Beth Reiser|New York|(212)55587 25
    111|Dylan Ricci|Syracuse| (315)5554486
    116|Brian Gugliuzza|Mamar oneck|(914)5553 817...
    See more | Go to post
    Last edited by RedSon; Mar 18 '09, 06:53 PM. Reason: Added [CODE] tags!

  • MiziaQ
    started a topic GridLayout
    in Java

    GridLayout

    Is there a way to have an uneven (LARGER) horizontal gap between the 2nd and 3rd columns, using gridLayout, and leave the gaps between 1st, 2nd and 3rd and 4th the same (SMALLER)?

    container.setLa yout(new GridLayout(5, 4, 5, 5));
    See more | Go to post

  • MiziaQ
    replied to package org.jdesktop.layout;
    in Java
    Where can I find the jar file and how do i go about doing this?
    See more | Go to post

    Leave a comment:


  • MiziaQ
    started a topic package org.jdesktop.layout;
    in Java

    package org.jdesktop.layout;

    I designed my GUI in netbeans, now i'm trying to figure out
    why the app won't compile. I think i need to import a package:

    package org.jdesktop.la yout;

    Do I need a .jar file for this ?
    Please help.
    See more | Go to post

  • MiziaQ
    started a topic tabPane.getSelectedIndex();
    in Java

    tabPane.getSelectedIndex();

    Hey, i've written this code to check which tab is selected. I want a new frame to open when the 3rd tab is selected. The app complies, but does nothing for some reason.

    public void actionPerformed (ActionEvent e) {

    int index = tabPane.getSele ctedIndex();
    if (index == 2) {

    pedGUI PED = new pedGUI();

    }
    }
    See more | Go to post

  • MiziaQ
    started a topic Searching through an access database
    in Java

    Searching through an access database

    I've created a GUI for a hospital visitor system to allow visitors to find patients based on surname. I've also made a table in access with patient names, surnames, date of birth, gender, ward, rooms, etc. I'm trying to figure out a way to connect to the table, and to retrieve patient details into JTextFields based on a search of a patient's surname. Any help greatly appreciated. Thanks in advance.
    See more | Go to post

  • MiziaQ
    replied to calling gui component from super class
    in Java
    I have a JFrame which uses a splitpane, so i'm using two panes. I want to create a new class - one in which i can use the contentPane declared in the main class.
    See more | Go to post

    Leave a comment:


  • MiziaQ
    started a topic calling gui component from super class
    in Java

    calling gui component from super class

    how can i call a gui component (contentPane) from a super class to a different class ? Code would be appreciated. Thanks in advance
    See more | Go to post

  • MiziaQ
    started a topic JTextArea position
    in Java

    JTextArea position

    is there a way to position the jtextarea on the content pane in a certain location ?
    See more | Go to post

  • MiziaQ
    replied to Executable File
    in Java
    I'm using jGrasp to create an executable, so I have no idea how to do this manually.
    See more | Go to post

    Leave a comment:


  • MiziaQ
    replied to Executable File
    in Java
    I'm not sure what you mean. Could you please give some more detail.

    Thanks in advance,

    Mike
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...