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...
User Profile
Collapse
-
...Code:SELECT CASE WHEN [type] = 1 OR [type] = 3 THEN 'yes' ELSE 'no' END FROM table_name
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...Leave a comment:
-
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 luckLeave a comment:
-
...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) 'Leave a comment:
-
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...Leave a comment:
-
...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 #"Leave a comment:
-
Don't use GROUP BY
select count(user.name ) from user where user.name = 'bb'
that's it. Don't add anything else after...Leave a comment:
-
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")Leave a comment:
-
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.
...Leave a comment:
-
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.Leave a comment:
-
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...Leave a comment:
-
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 = TrueLeave a comment:
-
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?...Leave a comment:
-
You can do something like
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)...Code:SELECT * FROM users WHERE BINARY_CHECKSUM(username) = BINARY_CHECKSUM('username') AND BINARY_CHECKSUM([passwd) = BINARY_CHECKSUM('password')Leave a comment:
-
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...Leave a comment:
-
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......Leave a comment:
-
There are other parameters you can specify to control the formatting...Code:Response.Write FormatNumber(val)
...Code:FormatNumber(Expression[,NumDigAfterDec[, IncLeadingDig[,UseParForNegNum[,GroupDig]]]])
Leave a comment:
-
I dont think FormatDateTime is a valid function access SQL.
Try something like Format(depart_t ime - Time(), "HH:MM")...Leave a comment:
-
At first glance, looks like changing max(id) and id < @cid to min(id) and id > @cid should workLeave a comment:
No activity results to display
Show More
Leave a comment: