User Profile

Collapse

Profile Sidebar

Collapse
Metalzed
Metalzed
Last Activity: Jun 9 '08, 11:31 PM
Joined: Sep 24 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Metalzed
    started a topic Use a bit(Boolean) in a DataList
    in .NET

    Use a bit(Boolean) in a DataList

    Hi i have a table with my message. With a query i get the values Namn(varchar(50 ) , Message(Text) , Sent(datetime) , Seen(bit)

    The Namn , Message and sent i just want to write out and it works.
    But with the seen i dont want to write true or false or 1 and 0. I want to change a image..

    How does it work? I dont have a clue to where to begin.

    Here is my code that works today.


    ...
    See more | Go to post

  • I don't think it is the code side that is the problem.




    First.

    Watch these 2 examples and i think you notice the problem and solution

    I got a table called temp
    Id (int) Date(datetime)
    -----------------------------------------
    1 2007-03-22 05:26:33
    2 2007-03-22 05:26:40
    3 2007-03-22 05:26:47
    that are added by the funktion NOW()...
    See more | Go to post

    Leave a comment:


  • Thanks.. Worked perfekt.
    See more | Go to post

    Leave a comment:


  • Giving values to multible Varibles with SET and SELECT

    Hi my problem is real simple. I want to give 2 Varibles values from one SELECT query

    Here a exampel.

    Code:
    DECLARE @test1 int , @test2 int;
    
    SET @test1=SELECT a FROM Table_T
    SET @test2=SELECT b FROM Table_T
    I dont want to use 2 diffrent selects is there any way to do something like this
    Code:
    DECLARE @test1 int , @test2 int;
    
    SET @test1 , @test2=SELECT a , b FROM Table_T
    ...
    See more | Go to post

  • Metalzed
    replied to SQL select question
    I am at work so i dont't got any prog to test the query but i think it should be something like this.

    SELECT tblUsers.userna me, Count(tblUsers_ F.fromid),Count (tblUsers_T.toi d),Count(tblUse rs_F.unread),Co unt(tblUsers_T. unread) FROM tblUsers INNER JOIN tblMessages ON tblMessages.fro mid=tblUsers.us erid As tblUsers_F
    INNER JOIN tblMessages ON tblMessages.toi d=tblUsers.user id As tblUsers_T


    (Not the best way...
    See more | Go to post

    Leave a comment:


  • Metalzed
    replied to save point?
    in .NET
    hard to say best way to do it.. With that little info i would say. Save all values in a textfile with a char to seperate them. example


    Game1.sav

    5#123#Hunter#5. 44434#2#3#1#1




    Then just read and fill the varibles.

    to prevent cheating you can crypt the file while writing. Then de-crypt it on loading
    See more | Go to post

    Leave a comment:


  • Metalzed
    replied to C# Allows To Create Structures???
    in .NET
    Here is some code so that you see that basic and have some search words

    Code:
    struct Point3D
    {
    
    public float m_x;
    public float m_y;
    public float m_z;
    public string name;
    
    public float [] GetArray()
    {
    
    float [] arr = new float[3];
    arr[0] = m_x;
    arr[1] = m_y;
    arr[2] = m_z;
    return arr;
    
    }
    
    }
    ...
    See more | Go to post

    Leave a comment:


  • Metalzed
    started a topic Datetime output diffrent in C# and MSSQL

    Datetime output diffrent in C# and MSSQL

    Hi I have a little problem

    If I use the this C# code
    Code:
    DateTime.Now.ToString()
    output = 2006-11-03 06:15:17

    But if i use this code in MSSQL
    Code:
    (CONVERT(VARCHAR(35), { fn NOW() }))
    output= Nov 3 2006 6:15AM

    How do I do to get " 2006-11-03 06:15:17 " instead of " Nov 3 2006 6:15AM " with MSSQL

    Not a big problem exept the chat looks very strange when...
    See more | Go to post

  • Metalzed
    started a topic Updating a larger site how does it work?
    in .NET

    Updating a larger site how does it work?

    I will soon publish my first "big" site. it uses a couple of pages and a database with about 25 tables. Then a thing hit me.

    Say that i publish the site. Users do changes in tables like insert, update delete..

    Then i want to realese version 2.

    I want to change some pages code. maby some tables. But still i cant erase all user info.

    How do you do that in best way?

    ...
    See more | Go to post

  • Metalzed
    replied to Joins in MSSQL
    Dont know if this helps you but this is 2 diffrent ways to do the same thing

    We have a TABLE called tbl_books
    with two columns
    bookname & author

    We want to see all books the author that wrote Lord of the Rings have published



    Code:
    SELECT     bookname
    FROM         tbl_books
    WHERE     (author =
                              (SELECT     author
    ...
    See more | Go to post
    Last edited by Metalzed; Oct 25 '06, 04:50 AM. Reason: Missed to explain tbls

    Leave a comment:


  • Metalzed
    replied to How can i add 'Day' to my webpage?
    in .NET
    What do you meen? in a label? the day it is today? or just like a varible? or just as plain html...
    See more | Go to post

    Leave a comment:


  • It could be that the site have to update before you see the changes.

    test to click one time the refresh the site.
    See more | Go to post

    Leave a comment:


  • Metalzed
    replied to writing code
    in .NET
    Dont realy understand what you want..
    What syntax are you writing in

    Splitting up money could be done with a code like this (dont know if it is the best way


    Code:
             int money=1234;
             int fifties, twenties, tens;
    
            
              fifties= Convert.ToInt32(Math.Floor((money/ 50)));
              money= money- fifties* 50;
    
              twenties=
    ...
    See more | Go to post

    Leave a comment:


  • Simple beginners question about stored procedures

    Hi

    I have made my first Stored procedure and want to use it in a update command.

    This is my update command

    Code:
    UPDATE    TEMPCHAR
        SET              HP = TEMPCHAR.HP + 5    FROM         TEMPCHAR
    The 5 should be replace with the procedure GETRANDOM that takes 3 arguments and return one int.


    This code works
    Code:
    	DECLARE @returnstatus
    ...
    See more | Go to post

  • I am not sure
    But it could be this

    "Insert INTO Customer (FirstName), VALUES cstr(txtcustome rname.text)"

    is not a proper SQL query.
    is txtcustomername a textbox?

    then the row
    updatecustomerd atabase("Insert INTO Customer (FirstName), VALUES cstr(txtcustome rname.text)")

    should be change to
    updatecustomerd atabase("Insert INTO Customer...
    See more | Go to post

    Leave a comment:


  • Metalzed
    replied to Adding text to a text column
    Thanks for the help. worked perfekt....
    See more | Go to post

    Leave a comment:


  • Metalzed
    started a topic Adding text to a text column

    Adding text to a text column

    Hi

    I want to have a log so in my table i got a TEXT field called LOGG. I want to update this field with new data by adding more text to field.

    I am using MS SQL

    'test' + 'test' doesn't work . say you cant add 2 text to each other

    concat('test',' test') doesn't work . say that CONCAT isn't a built in function


    this code works but is it really the best way to do?...
    See more | Go to post

  • Metalzed
    replied to C# Button Hide
    in .NET
    You meen in the code

    Code:
    Button1.Visible = false;
    where Button1 is the id for the button.

    To show it again you do same thing just change false to true
    See more | Go to post

    Leave a comment:


  • Thanks..
    Worked perfekt.

    I understand the syntax. Havn't seen the command "id not in" before.

    Thanks again...
    See more | Go to post

    Leave a comment:


  • Need help with SELECT Query. dont know what topic

    I have 4 tabels

    tbOWNERS // PLAYERS
    ID , NAME
    1 Mike
    2 Rambo
    3 Sam


    tbCARS // CARS THAT EXIST AND WHO OWNS THEM
    ID , CAR , OWNER
    1 Honda 1
    2 Honda 3
    3 Volvo 1
    4 Volvo 2
    5 Saab 1
    6 Saab 2
    7 Saab 3

    tbTRACKS // DIFFRENT RACES THAT PLAYER CAN JOIN...
    See more | Go to post
No activity results to display
Show More
Working...