Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20
  1. #11
    Senior Member echoSwe's Avatar
    Join Date
    May 2004
    Posts
    332
    Member #
    5926
    Hi there Holokai!

    Thanks
    Collage - how old are you then? Thatäs like university isn't it?
    I finished the gymnasium this spring which means that I am 18. (as u should know by now ) I haven't read any formal courses in any web-related subjects, but I'm comming to the line where I need to know more about programming in order to create better applications. Up till now I have been learning Photoshop, CSS, XHTML, Javascript and so on, (and ASP 3 and the basics of ASP.Net), so now I have started with three tier and it's going mostly good.

    You don't happen to know how to add parameters to MySQL properly?

    However, I do recognize your approach on design - visit a couple of sites - but I try to take their functionality and their structure rather than their looks... The looks is btw, quite easy I think if you get on the right track - you need to know what it's going to be used for and you need a couple of descent images for the header.

    What's this grid layout you're talking about?

    So do you work for a web developing company then?

  2.  

  3. #12
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    Hey Echo,

    I'll be 23 In a few days.

    You're right about finding a couple good header images being important - that's what I'm looking for right now. I've had a camera on me constantly for the last three days now. Even after that though, I find it hard to finish off a design. I'm not very good at creating images and graphics. I can edit photos with Photoshop fairly well, but that's about it. I'm looking into some graphic design courses at the local college to help me out.

    The grid layout is something that Visual Studio.net inserts into your HTML file if you use VS.NET to do your ASP.NET. It's annoying. I just hope that it can be deleted, and not get inserted back into the code automatically like some other things are.

    I am actually a realtor in arizona, and I also do some construction work. I would love to have a job pertaining to programming, but Where I live, it's about impossible. I am thinking of moving back to Hawaii to get one though.

    What is your question about MySQL?

    - Chris
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  4. #13
    Senior Member echoSwe's Avatar
    Join Date
    May 2004
    Posts
    332
    Member #
    5926
    Quote Originally Posted by Holokai
    Hey Echo,

    I'll be 23 In a few days.

    You're right about finding a couple good header images being important - that's what I'm looking for right now. I've had a camera on me constantly for the last three days now. Even after that though, I find it hard to finish off a design. I'm not very good at creating images and graphics. I can edit photos with Photoshop fairly well, but that's about it. I'm looking into some graphic design courses at the local college to help me out.

    The grid layout is something that Visual Studio.net inserts into your HTML file if you use VS.NET to do your ASP.NET. It's annoying. I just hope that it can be deleted, and not get inserted back into the code automatically like some other things are.

    I am actually a realtor in arizona, and I also do some construction work. I would love to have a job pertaining to programming, but Where I live, it's about impossible. I am thinking of moving back to Hawaii to get one though.

    What is your question about MySQL?

    - Chris
    Do you mean the absolutely positoined layers that MS VS uses if you don't tell it otherwhise? Just go to settings and change it to a flowed layout.

    Hawaii sounds great . Never been there...

    My question was actually stated in the last post - how do you create a parametized command in ASP.Net for MySQL?

  5. #14
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    Hello again Echo,

    Yeah, I figured all that flow layout crap out. Was way easier than I thougt, I just missed the damned option the first couple of times I went through the properties of the page ::sigh::

    Anyhow, I don't think you can use parameterized commands with MySQL. I've only looked into it briefly, but as I recall I didn't find a solution. I'll look some more though, as it's of interest to me as well, especially now that I actually have a test site running.

    - Chris
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  6. #15
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    Echo - check this out, This should answer your parameter question. Scroll down about half way, and look in the code box. The article is about something else, but it shows parameterized MySQL

    Answer!

    hope this helps... chris
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  7. #16
    Senior Member echoSwe's Avatar
    Join Date
    May 2004
    Posts
    332
    Member #
    5926
    Naah, it didn't help, but it got me searching for an answer.

    Here a mock page is.

    Code:
    using System;
    using System.Data;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using MySql.Data.MySqlClient;
    
    public partial class TestWithMySqlParameters : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
    
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            InsertData();
        }
        protected void InsertData()
        {
            using (MySql.Data.MySqlClient.MySqlConnection objConn = new MySql.Data.MySqlClient.MySqlConnection(
                System.Configuration.ConfigurationManager.ConnectionStrings["MySQL"].ConnectionString))
            {
                MySqlCommand objCmd = new MySqlCommand("INSERT INTO test(fname, lname) VALUES (?firstname, ?lastname)");
                objCmd.Connection = objConn;
    
                objCmd.Parameters.Add("?firstname", txtFirstName.Text.Trim());
                //objCmd.Parameters["?firstname"].Direction = ParameterDirection.Input;
                objCmd.Parameters.Add("?lastname", txtLastName.Text.Trim());
                //objCmd.Parameters["?lastname"].Direction = ParameterDirection.Input;
    
                objConn.Open();
                lblAnswer.Text = objCmd.ExecuteNonQuery().ToString();
            }
        }
    }
    Code:
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestWithMySqlParameters.aspx.cs"
        Inherits="TestWithMySqlParameters" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                Fname:
                <asp:TextBox ID="txtFirstName" runat="server">First name 1</asp:TextBox><br />
                Lname:
                <asp:TextBox ID="txtLastName" runat="server">Last name 1</asp:TextBox><br />
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Insert into database." /><br />
                <br />
                <asp:Label ID="lblAnswer" runat="server" ForeColor="Red" Text="Label"></asp:Label></div>
        </form>
    </body>
    </html>
    http://mysql.mirror.netmonic.com/Dow...nector-net.pdf
    page 21

  8. #17
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    So the test page works? That's odd that the parameter code you're using is the VB code, rather than the C# code.

    I'll have to play around with that as well.

    I'm stuck on repeaters right now, I tried to figure them out while I was handling my work load at the office today

    I Can't get the repeater to output my database data. I've tried several different ways, including

    <%# DataBinder.Eval(Container.DataItem, "title") %>
    and
    <%# Container.DataItem["title"] %>

    all the ways seem to work in the tutorials that I read, but not when I Try it. I'll keep pluggin away at it.

    This repeater class is pretty cool though. It's exactly what I've been doing, but it keeps the formatting in the HTML file where it belongs.

    - Chris
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  9. #18
    Senior Member echoSwe's Avatar
    Join Date
    May 2004
    Posts
    332
    Member #
    5926
    I bet you'll manage the repeater soon. It's nothing hard really.

    I don't use VB.Net at all, I use C#, hence all the code I have posted is C#. Where is the VB code? One is C# one is markup.

  10. #19
    Senior Member Holokai's Avatar
    Join Date
    Sep 2004
    Location
    Honolulu, HI
    Posts
    127
    Member #
    7707
    Nevermind, I misread. Ooops. I did get the repeater working, I merely forgot to use "reapeater.DataBind();" Double ooops.
    -----------------------------------------------
    I know just enough to be dangerous to myself and others around me... I'm more of a CSS kamikaze than a CSS ninja...

  11. #20
    Senior Member echoSwe's Avatar
    Join Date
    May 2004
    Posts
    332
    Member #
    5926
    Lol!
    C#-kamikaze-programmer rather than ninja-programmer as well then?


Page 2 of 2 FirstFirst 1 2

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:43 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com