Search:

Type: Posts; User: l12ngo

Page 1 of 2 1 2

Search: Search took 0.06 seconds.

  1. Replies
    14
    Views
    672

    Re: [RESOLVED] Arrays

    Not really. Dictionaries are quick (usually more so than multi-dimensional arrays), powerful and have a few methods and properties built into them that are pretty handy.

    Here's a link that lists...
  2. Replies
    14
    Views
    672

    Re: Arrays

    You can do something similar by making a dictionary of an array element. I've tried taking a simple example and commenting it. If you just put all the code in an asp file it should work fine and you...
  3. Replies
    12
    Views
    698

    Re: Windows media Player problem

    You may have more luck posting in the other forum seeing as you're using JavaScript:

    http://www.vbforums.com/forumdisplay.php?f=11

    Whilst a lot of people who come here probably do have some...
  4. Replies
    1
    Views
    573

    Re: Opening Excel via web page VBscript / WSH

    You could try using: Response.ContentType = "application/vnd.ms-excel"

    Just google the term if you want to find examples of using it.
  5. Re: Grouping and displaying in a table

    If you're getting the message Expected End, it would suggest one of your If statements doesn't have a corresponding End If. There is a problem however with the line you posted, you're missing the "...
  6. Re: Grouping and displaying in a table

    The problem is still your sql string. In Access you use DAO to query the database, in ASP you need to use ADO to do your query. The code I posted would create a Table for you in ASP no problem, like...
  7. Re: Grouping and displaying in a table

    It's probably going to be easier if you Order By city in your SQL statement. Then you just loop through your recordset something like:

    <%
    Dim rs, cn, strDSN, StrSQL, tempVal
    set cn =...
  8. Replies
    2
    Views
    415

    Re: Type Mismatch Error

    If you're taking the value 5 from your page as a string and your providing this to your database (which is expecting an integer) then this will be you're problem. There are several functions...
  9. Replies
    3
    Views
    486

    Re: Having Trouble With an Array

    I know this is a late reply, but I think I finally figured out what you're trying to achieve (I can be a bit slow on the uptake ;) ):

    Const ForReading = 1
    set fso =...
  10. Re: Asp doesn't find records on table

    Although Access uses * for it's wildcards, you're performing a query using ADO so you still need to use %. I've just created a table in an access db called Projects with two values (one called...
  11. Replies
    1
    Views
    403

    Re: Extensions from complete filename?

    This writes out html when I run it, if attach_name is changed to test.doc, it will print out doc:

    attach_name = "test.html"
    dim strURL,addURL
    strURL = attach_name
    addURL = split(strURL,".")...
  12. Re: Error: No value given for one or more required paramet

    Though this may or may not directly help you with this particular query, I've noticed you've been doing a lot of work with ADO recently. There are a few things I'd consider doing if possible.

    1....
  13. Re: Error: No value given for one or more required paramet

    Have you actually set conn further up your code?
  14. Replies
    7
    Views
    673

    Re: How do I get just part of a variable?

    You could also do it this way:

    varPath = "filelocation/images/myphoto.jpg" 'set variable to path
    response.write mid(varPath, InStrRev(varPath, "/") + 1) 'display result

    So if you were putting...
  15. Replies
    4
    Views
    424

    Re: Some error to do with body tag

    Could be the function (called go) you're trying to call onload. Does this function exist? Try removing the onload=go() bit from your body tag.
  16. Replies
    9
    Views
    14,385

    Re: Directory Listing to Excel Spreadsheet

    Okay, try this and let me know what we need to do from here. I've commented this script so you know what's going on:

    Option Explicit 'thrown this in to keep track of my variables

    ' declare my...
  17. Replies
    9
    Views
    832

    Re: Can not divide in ASP!

    If you're ever unsure about what type of variable you're pulling back from things then you can try using typename to help you out, so:

    msgbox Typename(found_rows)

    in this case.
  18. Replies
    9
    Views
    14,385

    Re: Directory Listing to Excel Spreadsheet

    No worries about things getting more complicated, it's usual to keep adding complexity to scripts as your needs develop so we're good there.

    Now, there's good news and bad news. First the bad...
  19. Replies
    9
    Views
    14,385

    Re: Directory Listing to Excel Spreadsheet

    Yes, if you look at the line:

    objSheet.Cells(i, j).value = file.name


    j is a variable which is set to 1 in my code. i is another variable which is set to one, but is incremented by 1 each time...
  20. Replies
    12
    Views
    991

    Re: replacing text in a string

    Just seen this post and it looks like you've sorted it anyway, but this may help for in future:

    Dim strToDo, re, matches
    strToDo = "My CAR is a cAr and caR beside my Car is a cAR too"

    set re =...
  21. Replies
    3
    Views
    580

    Re: Passing on text to url

    I don't know about .Net, but in Classic ASP you'd use Response.Redirect and Request.Querystring to grab the info from your URL. Your probably better off waiting for someone who knows .Net, but if...
  22. Replies
    2
    Views
    468

    Re: Exception occurred

    Do you get a value if you response.write gpermohonan("id") after the first sql query (you can just throw in a response.end after it to stop the second query throwing up an error while you debug)? If...
  23. Replies
    9
    Views
    14,385

    Re: Directory Listing to Excel Spreadsheet

    Could try something like:

    Dim fso, objFolder, obFileList, folderpath, fullpath, xl, i, j
    folderpath = "C:\Test"
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set objFolder =...
  24. Replies
    3
    Views
    620

    Re: Compare data from a text file

    OK, I thought it was a line by line comparison you were after. As you seem comfortable using recordsets, this will read your text files into two different recordsets (rs & rs2):

    Dim rs, fso,...
  25. Replies
    3
    Views
    620

    Re: Compare data from a text file

    Try this:

    Const ForReading = 1
    Const ForWriting = 2
    set fso = CreateObject("Scripting.FileSystemObject")
    set objText1 = fso.OpenTextfile("C:\Textfile1.txt", ForReading)
    set objText2 =...
  26. Replies
    2
    Views
    605

    Re: Quiet/Invisible ping

    The only way you can hide your DOS box is if you use Run method as opposed to Exec:
    ...
  27. Replies
    3
    Views
    558

    Re: input validation

    Your code looks like VB6, not VBScript/ASP. If you are using VB6, you'd probably get abit more help from the Classic VB forum. If you're using ASP, then I agree with the other poster that using...
  28. Replies
    10
    Views
    725

    Re: Saving from access to TXT in asp

    If you're using the filesystem object anyway, you could use the delete file method:

    objFSO.DeleteFile(strFile)
  29. Replies
    2
    Views
    1,573

    Re: Pulling computer name + WMI query

    This WMI call works on my local PC:

    Set colCompSys = objWMIService.ExecQuery _
    ("Select * from Win32_ComputerSystemProduct")
    For Each objCompSys in colCompSys
    Wscript.Echo...
  30. Re: How to access a variable that is in the URL

    Just use Request.Querystring. In your example, this would return the value me:


    varUser = Request.Querystring("User")
    Response.write varUser
  31. Replies
    4
    Views
    796

    Re: List files ordered by date

    This will search for all the files in c:\users:

    Dim rs, fso, objFolder, obFileList
    Const Maxchrs = 255
    Const adVarChar = 200
    Const adFldIsNullable = 32
    Const adInteger = 3

    Set rs =...
  32. Thread: Installed path

    by l12ngo
    Replies
    5
    Views
    700

    Re: Installed path

    This should cope with null values:

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * from...
  33. Replies
    20
    Views
    1,505

    Re: Newbie, declaring a variable as Null

    Well, sometimes you can pull values back from a database and then you'd use something like:

    If Not IsNull(x) Then
    'do something
    End If

    where x would usually be something like...
  34. Replies
    30
    Views
    108,431

    Re: runtime error '6':overflow

    It could also be down to the actual data you're passing to it. Say for example (just working with integers again), you've been passing order numbers to the app via your file, the app could be then...
  35. Replies
    30
    Views
    108,431

    Re: runtime error '6':overflow

    I doubt it's a database problem with an overflow error like that, but others here would know more about the database side of things so I'll let them answer that.

    Is CRF the full name of the...
  36. Replies
    30
    Views
    108,431

    Re: runtime error '6':overflow

    It could also be because you're passing too much data in, so you could try splitting up a file if you have a huge file you're passing to it. For example, this would cause an overflow error:

    Dim i...
  37. Re: listBox how to get specific items

    msgbox Me.List1.List(1)

    If you wanted to msgbox out the third item:

    msgbox Me.List1.List(2)

    Obviously this is assuming your list is called List1.
  38. Replies
    29
    Views
    1,103

    Re: complexity of an application

    I'd probably try to look for a worse product to compare my app to. For example if I had an app that was used in Warehouse management, I'd probably use something like Popims (an old but still widely...
  39. Thread: Installed path

    by l12ngo
    Replies
    5
    Views
    700

    Re: Installed path

    You could try using a WMI call for the Win32_Product class. It may pick it up in there. Thought I'd post an example:

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer &...
  40. Replies
    29
    Views
    1,103

    Re: complexity of an application

    Lol, it's just as well you asked your prof what HE meant by complexity cause it sure sounds like no-one else thinks that's what it means :)

    That's one big report :D

    The striking things out of...
Results 1 to 40 of 55
Page 1 of 2 1 2



Click Here to Expand Forum to Full Width