User Profile

Collapse

Profile Sidebar

Collapse
jagged
jagged
Last Activity: Mar 27 '08, 08:43 PM
Joined: Feb 22 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jagged
    replied to txtCustCode_Change()
    Hey Killer,

    Are you revising all my recent posts? :)

    What do you mean by comparing strcat to "0" or "9"? Like one big IF strChar = "0" or strchar = "1" or .... or a Select Case strchar : Case "0","1","2" .... ?

    From experience, string manipulation in VB is not the fastest thing. Maybe it doesn't apply to comparison (I doubt it) but like...
    See more | Go to post

    Leave a comment:


  • Code:
    SELECT 
    CASE 
    WHEN [type] = 1 OR [type] = 3 THEN 'yes' 
    ELSE 'no' 
    END 
    FROM table_name
    ...
    See more | Go to post

    Leave a comment:


  • What error are you getting?

    Personally I've never used the Response.AddHea der "Content-Disposition", "attachment;fil ename=" & Trim(rs("name") )
    Response.AddHea der "Content-Length", rs("size") when outputting images so you can try to comment them out and see if that helps.

    I would also remove the loop. Im not sure outputting two images one after the other would...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to create DBF files using SSIS
    Check out: http://technet.microso ft.com/en-us/library/aa337084.aspx

    Explains how to make a connection to a DBF. After that it's normal ssis stuff.

    If you get the "cannot convert unicode to non-unicode error on your columns" error, use a query to CAST() your strings to nvarchar or nchar...

    Good luck
    See more | Go to post

    Leave a comment:


  • jagged
    replied to txtCustCode_Change()
    Code:
    Private Sub Text1_Change()
        Dim strChar
        Dim strNumbersOnly
        
        For x = 1 To Len(Text1)
            strChar = Mid(Text1, x, 1)
            If Asc(strChar) >= 48 And Asc(strChar) < 58 Then
                strNumbersOnly = strNumbersOnly & strChar
            End If
        Next
        
        Text1.Text = strNumbersOnly
        Text1.SelStart = Len(strNumbersOnly) '
    ...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to Back up
    Just copy the file to another directory or with another when your program exits, after you've closed all connections to the database...

    FileCopy app.path & "\mydb.mdb" , app.path & "\mydb_backup.m db"

    or use the FileSystemObjec t...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to Help with inputbox values?
    Code:
    'Declare and initialize variables
            Dim strPointsScored As String
            Dim decPointsScored As Decimal
            Dim decFinalScore As Decimal
    
            ' Messages
            Dim strInputBoxMessage As String = "Enter score #"
            Dim strInputBoxHeading As String = "Points Scored"
            Dim strNormalBoxMessage As String = "Enter score #"
    ...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to Doubt in COUNT(*)
    Don't use GROUP BY

    select count(user.name ) from user where user.name = 'bb'

    that's it. Don't add anything else after...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to request form error
    It looks like request.form("e ditband") is empty, hence you are actually calling this query:

    select * from band where band_name = ''


    Unless you have records where band_name is an empty string, it would return an empty recordset and throw that error when you try to use it.


    You should do something like:

    Code:
    editband=request.form("editband")
    ...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to Help with inputbox values?
    On Line 35, change decTotalScore2 = Convert.ToDecim al(strTotalScor e2) to
    decTotalScore2 += Convert.ToDecim al(strTotalScor e2)

    so it keeps adding the last entered scored to the total score.

    I think Line 43 (decTotalScore2 += Me.lstScores.It ems.Add(decTota lScore) ) is useless. Here, you're adding the return value (if there is any) of the Add method to decTotalScore2. I dont think that's what you want.
    ...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to Doubt in COUNT(*)
    SELECT COUNT(user.name ) FROM Users where .... returns 0 if there are no records.

    I'm not sure if you're trying to do something else, but from the looks of it, you don't need the group by / having at all.
    See more | Go to post

    Leave a comment:


  • jagged
    replied to My.Computer.network.ping Do Until Loop
    in .NET
    Where is this code? Is it in the form_load event?

    Did you include the Application.DoE vents()? That processes other messages on the queue, like drawing the form so if you left it out, that could be why you don't see the form.

    What you should do is drag a timer on your form, double click on it to open the event handler and then paste the IF Then block in there (no do .. loop). Set the interval to 1000 (1 second) and...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to My.Computer.network.ping Do Until Loop
    in .NET
    Do until True
    Loop

    essentially does nothing. You loop until the condition after "until" specified is true. Since you set it to true, it never enters the loop.

    You want something like:

    Code:
    Do 
            If My.Computer.Network.Ping(IPAddress) = False Then
                PictureBox1.Visible = True
            Else
                PictureBox2.Visible = True
    ...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to system DSN connection
    Whats the connection string?
    Do you have a firewall?

    From the other Windows 2003 server, can you telnet to port 1433 of the SQL Express server?...
    See more | Go to post

    Leave a comment:


  • You can do something like

    Code:
    SELECT *
    FROM users
    WHERE 
    BINARY_CHECKSUM(username) = BINARY_CHECKSUM('username') AND 
    BINARY_CHECKSUM([passwd) = BINARY_CHECKSUM('password')
    You can leave the " username = 'username' and passwd = 'password' " in the where clause to cover the *extremely* unlikely event that two different usernames and passwords (used in the same record)...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to To fetch common values between two rows
    Brad is right, you really need to change your schema and store the interests as rows in a different table, ie

    mem_id, interest
    1, golf
    1, tennis
    2, polo
    2, tennis

    then it's easier to extract info afterwards or even to have more than 3 interests later.

    If you really can't change it, then you can do something like

    SELECT mem_id
    FROM
    (
    SELECT...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to Syntax Error (input character)
    Escape all single quotes...
    Code:
    WHERE Title LIKE '%" & Replace(varExp,"'","''") & "%';"
    .


    Btw, running dynamic sql with parts taken straight from user input opens you up to sql injection attacks......
    See more | Go to post

    Leave a comment:


  • jagged
    replied to vbscript, ms access
    Code:
    Response.Write FormatNumber(val)
    There are other parameters you can specify to control the formatting...
    Code:
    FormatNumber(Expression[,NumDigAfterDec[, IncLeadingDig[,UseParForNegNum[,GroupDig]]]])
    ...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to format date time in Access / ASP
    I dont think FormatDateTime is a valid function access SQL.

    Try something like Format(depart_t ime - Time(), "HH:MM")...
    See more | Go to post

    Leave a comment:


  • jagged
    replied to stumped with stored proc and temp tables
    At first glance, looks like changing max(id) and id < @cid to min(id) and id > @cid should work
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...