What is "My quotes"?
ASP web-programming
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > ASP web-programmingGo to page: « previous | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | next »

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:
Monday, 16 June 2008
LDAP version of winnt://.../user ? S_m_b 19:43:47
 I'm porting some code over to use ADS for user data lookup, but can't find
a clear reference anywhere to the old windows 2000 userid (the network
login). Does it still exist within LDAP, or will I have to match to sn &
givenName?
comment 1 answer | Add comment
Saturday, 14 June 2008
Help Creating Password protected Excel file !Tg 17:31:09
 I can't seem to figure out how it's done. I know it has to be something
fairly simple.
I know how to open an excel file, but I'd like to open it, insert values and
save it with a different name and password protect.


comment 1 answer | Add comment
CDONTS NewMail Earl Partridge 11:55:38
 If there's a newgroup for this subject, please point me to it...
Is it possible to set the font size of the body of the text?
Earl
comment 15 answers | Add comment
newbiie (ish) getting the client URL when using custome errors asp ? Rvj 07:15:14
 Im sure this is dead simple but

where do you find the URL causing the error ?

I am trying to catch bad directory references using IIS custom errors tab

It points to my error handler eg error404.asp

however when that executes Request("URL") it shows the address
of the error handler not the original address causing the problem

which variable holds the original URL?


comment 1 answer | Add comment
End-Of-Life Date for Classic ASP? DylanSmith 02:01:25
 Is there an end-of-support date for Classic ASP?

For example, I know that VB6 standard support ended sometime around March
2005, and extended support was available until around March 2008.

Is there a similar end-of-support date(s) for Classic ASP?
comment 4 answer | Add comment
Thursday, 12 June 2008
Re: a trappable error (c0000005) Santosh Anumandla 04:01:01
 Hi all,

I am getting the following error randomly, I cannot expalin the exact
scenario

Active Server Pages error 'ASP 0115'
Unexpected error
/wmweb/Save.Asp
A trappable error (C0000005) occurred in an external object. The
script cannot continue running.
Appreciated your help on this.

The Code :

<%@ CodePage=65001 Language=JavaScript­ %>

<%
var url = String(Request.Serv­erVariables("HTTP_RE­FERER"));
var orig_url = String(Request.Serv­erVariables("HTTP_RE­FERER"));

var session = "<session id='new'></session>­<errors></errors>";
var requator = Server.CreateObject­("Requator.clsDoItAl­l");

if (requator.Init(sess­ion))
{
var retval = requator.OnStart();­
if (retval == "OK")
{
if (url.indexOf("actio­n=detail") > 0)
{
url = url.replace(/requat­or.asp/i,"Detail.asp­");
url = url.replace(/&actio­n=detail/i,"");
}
if (url.indexOf("actio­n=add") > 0)
{
url = url.replace(/requat­or.asp/i,"Add.asp");­
url = url.replace(/&actio­n=add/i,"");
}
if (url.indexOf("actio­n=copy") > 0)
{
url = url.replace(/requat­or.asp/i,"Copy.asp")­;
url = url.replace(/&actio­n=copy/i,"");
}
if ((url.indexOf("acti­on=Maintenance") > 0) ||
(url.indexOf("actio­n=maintenance") > 0))
{
url = url.replace(/requat­or.asp/i,"Maintenanc­e.asp");
url = url.replace(/&actio­n=maintenance/i,"");­
}
url += "&save=true";
%>
<script type='text/javascri­pt'>
var orig_url = "<%=orig_url%>";
var url = "<%=url%>";
top.fraBottom.fraRi­ght.location.replace­(url);
</script>
<%
}
}
%>


Thanks,San.

comment 1 answer | Add comment
Wednesday, 11 June 2008
ASP.NET web app works on some, not all, workstations Jg @ Hg 18:11:02
 I have a client that has contracted with a bank to process checks over the
Internet. The solution includes a check scanner and APS.NET web application.

The application does not work for all workstations at the client site.
There are two laptop computers than can run the web application and all it's
functions w/o failure. They have been able to do this from day one w/o
modification.

No other PC workstations can run all of the web application functions. Some
page return an 'Internal Server Error' message. The page displayed is a
custom error page with no other details.

For some reason the owners of the web application have no clue why their
application will work for some, but not others.

Some facts:
All workstations are XP SP2
There is a mix of IE6 and 7 but this does not seem to be an issue because
each laptop has a different version (1 has IE7, the other has IE6).
Application will not allow browsers other than IE5.5 or higher (Firefox is
out)
The application requires an ActiveX control to interface with the scanner.
Check scanning is not an issue.

I have tried the following:
Disabling local Windows Firewall, Defender, AV
Running as local administrator

Has anyone seen something like this before?

comment 2 answer | Add comment
You are about to access a Activex component Sm 14:38:39
 Hi,
We are trying to access a .net dll based method from classic asp code. When
the method is accessed, system gives a message "You are about to access a
Activex component". How do we suppress or stop this message from interfering
method access.

Any help is appreciated.
SM

comment 1 answer | Add comment
MS XMLHTTP or File System Object to Get Content Vunet 09:42:38
 The friendly URLs in ASP is the goal of my project. However, in ASP
there is no obvious page mapping as I researched compared to other
languages. What I mean is making www.site.com?page=H­ome being
www.site.com/home/
One of the workaround I know is to use MS XMLHTTP request on
www.site.com/home/i­ndex.asp page which will get the HTML content of
www.site.com?page=H­ome. I might replace some folder depth if needed in
resulting HTML.
However, there is another solution of using File System Object to get
the file's content (HTML) and display in the same way.
The question is:
1) which method is most effective (fast)?
2) are there other methods I missed?
Thanks.
comment 3 answer | Add comment
Website Admin Tool Herb 06:14:39
 Can I use the Website Administration tool to manage users and roles for
multiple ASP.NET applications using a single, common ASPNETDB?

If so, what changes do I have to make to the web.config files for these
various applications to allow authentication from that single ASPNETDB.

I'd also like to be able to maintain the users/roles and application access
from the web server rather than from my development computer. Right now it
seems like I have to make changes to user/roles in each web app and then
transfer the database and code over to the server, just to add a new user.

And each app seems to have it's own ASPNETDB which defeats the goal of a
single point of administration for the server.

Thank you,
--
stullhe104
comment 3 answer | Add comment
Tuesday, 10 June 2008
Linq and connection timeout Rick Dorris 14:43:01
 Been having a weird issue for the past few months -- might have started when
I moved my asp.net application to framework 3.5 so I could start using Linq
to Sql. When I open my application in VS2008 and click run, it ALWAYS
returns back to me in about 30 seconds saying there was a timeout in the
first bit of Linq that was executed. If I press "restart", to try running
the application again, it ALWAYS works the second time, and will continue to
work unless I wait about 15 or 30 minutes between runs. Then I'm back to the
timeout again on first connection. The sql server is on another box on the
same network, and I can assure you, there are no connectivity issues getting
to it. Feels like some sort of "connection pool" timeout, but I'm guessing.
Any ideas?

Thanks for the help!

comment 5 answers | Add comment
Disappearing ASP Cookies Davey P 13:47:23
 I have a classic ASP page which links through to an ASP.NET 1.1 page.
Basically there is a hyperlink on the classic ASP page that opens the ASP.NET
page in the same window. I can then go back to my classic ASP page by
clicking on a link on the ASP.NET page. It all seems to work seamlessly,
apart from 1 end user. What they find is that if they click on the link and
open up the ASP.NET page, then go back to the classic ASP page, all the
classic ASP cookies have been emptied out, yet the session info still
remains. They are running on a Windows Server 2003 machine with IIS 6. I've
tried to replicate it here, but as yet have been unsuccessful.
Any ideas would be greatly appreciated.
comment 1 answer | Add comment
Friday, 6 June 2008
Datagridview Won't stay updated Eric Landry 18:31:24
 I am posting this for a coworker.

-------------------­--------------------­-----------------

The issue i'm having is after i enter all my data into my gridview's
textboxes and dropdownlists the data wont stick. My object data source dumps
to a class but after the update the grid should read from the class as well.
After the update button is clicked all the data passes through the class
like it should and doesn't throw any errors. After all the data moves
through the class and the page reloads, it looks like it's adding a new
line. I am new to using "OOP" so my class's may be a bit off. I was told by
a co-worker that i should have an update method and not use the same insert
method? As this may be the issue, if someone could please take look at my
class and show me what an actual update method is. The commented portion of
my class below was my attempt at building an update method.
All help is greatly appreciated. Thanks!
ASPX code
<asp:GridView ID="pogrid" runat="server"
AutoGenerateColumns­="False"
style="margin-left:­ 0px; margin-right: 0px; margin-bottom: 0px"
Width="1020px" BorderColor="Black"­ BorderStyle="Solid"­
CellPadding="4"
BackColor="White" BorderWidth="1px"
ForeColor="Black"
GridLines="Vertical­" HorizontalAlign="Ce­nter"
BackImageUrl="~/POT­racking/images/butto­ntemplate.jpg"
Font-Names="Calibri­" DataSourceID="Objec­tDataSource1">
<FooterStyle BackColor="#CCCC99"­ />
<RowStyle BackColor="#E1E3EC"­ BorderColor="Black"­
BorderStyle="Solid"­
BorderWidth="1px" Font-Names="Calibri­"
HorizontalAlign="Ce­nter" />
<Columns>

<asp:CommandField ButtonType="Image"
DeleteImageUrl="~/P­OTracking/images/Del­etesmall.png"
ShowCancelButton="F­alse" ShowDeleteButton="T­rue"
ShowEditButton="Tru­e"
EditImageUrl="~/POT­racking/images/Docum­ent.png"
ShowInsertButton="T­rue"
UpdateImageUrl="~/P­OTracking/images/Syn­c.png" />
<asp:TemplateField HeaderText="QTY"
SortExpression="Qua­ntity">
<headerstyle width="36px" />
<EditItemTemplate>
<asp:TextBox ID="qtybox" runat="server" width="32px"
Text='<%# Bind("Quantity", "{0}")
%>'></asp:TextBox>
</EditItemTemplate>­
<ItemTemplate>
<asp:Label ID="qtylbl" runat="server" Text='<%#
Bind("Quantity") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle Width="40px" />
</asp:TemplateField­>
<asp:TemplateField HeaderText="Bill To"
SortExpression="Bil­lto" >
<headerstyle width="85px" />
<EditItemTemplate>
<asp:D­ropDownList ID="billtobox" runat="server"
DataSourceID="billt­o"
DataTextField="name­" datavaluefield="id"­
Width="79px"
SelectedValue='<%# Bind("Billto", "{0}") %>'
appenddatabounditem­s="true">
<asp:ListItem Value="0">Select</a­sp:ListItem>
</asp:D­ropDownList>­
<asp:SqlDataSource ID="billto" runat="server"
ConnectionString="<­%$
ConnectionStrings:P­­OTracking %>" SelectCommand="bill­to"
SelectCommandType="­StoredProcedure"></a­sp:SqlDataSource>
</EditItemTemplate>­
<ItemTemplate>
<asp:Label ID="billtolbl"
runat="server"></as­p:Label>
</ItemTemplate>
</asp:TemplateField­>

<asp:TemplateField HeaderText="Descrip­tion"
SortExpression="Des­cription">
<headerstyle width="454px" />
<EditItemTemplate>
<asp:TextBox ID="descbox" width="450px"
runat="server" Text='<%# Bind("Description")­ %>'></asp:TextBox>
</EditItemTemplate>­
<ItemTemplate>
<asp:Label ID="desclbl" runat="server" Text='<%#
Bind("Description")­ %>'></asp:Label>
</ItemTemplate>

</asp:TemplateField­>
<asp:TemplateField HeaderText="Type" SortExpression="Typ­e">
<headerstyle width="44px" />
<EditItemTemplate>
<asp:D­ropDownList ID="typebox" runat="server"
width="40px" appenddatabounditem­s="True"
DataSourceID="selty­pe" DataTextField='type­abbr'
DataValueField="id"­ SelectedValue='<%#
Bind("Type", "{0}") %>'>
<asp:ListItem Value="0">Select</a­sp:ListItem>
</asp:D­ropDownList>­
<asp:SqlDataSource ID="seltype" runat="server"
ConnectionString="<­%$
ConnectionStrings:P­­OTracking %>" SelectCommand="type­"
SelectCommandType="­StoredProcedure"></a­sp:SqlDataSource>
</EditItemTemplate>­
<ItemTemplate>
<asp:Label ID="typelbl" runat="server" Text='<%#
Bind("Type") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle Width="46px" />
</asp:TemplateField­>
<asp:TemplateField HeaderText="Project­"
SortExpression="pro­ject">
<headerstyle width="110px" />
<EditItemTemplate>
<asp:D­ropDownList ID="projbox" runat="server"
DataSourceID="Proje­ctrd"
DataTextField="name­" DataValueField="Pro­jectid"
width="106px"
SelectedValue='<%# Bind("project", "{0}") %>'
appenddatabounditem­s="true">
<asp:ListItem Value="0">Select</a­sp:ListItem>
</asp:D­ropDownList>­
<asp:SqlDataSource ID="Projectrd" runat="server"
ConnectionString="<­%$
ConnectionStrings:P­­OTracking %>" SelectCommand="proj­"
SelectCommandType="­StoredProcedure"></a­sp:SqlDataSource>
</EditItemTemplate>­
<ItemTemplate>
<asp:Label ID="projlbl" runat="server" Text='<%#
Bind("project") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField­>
<asp:TemplateField HeaderText="Unit Price"
SortExpression="Uni­tPrice">
<headerstyle width="79px" />
<EditItemTemplate>
<asp:TextBox ID="unitpricebox" width="75px"
runat="server"
Text='<%# Bind("UnitPrice", "{0:N}") %>'
Height="22px"></asp­:TextBox>
</EditItemTemplate>­
<ItemTemplate>
<asp:Label ID="unitpricelbl" runat="server"
Text='<%# Bind("UnitPrice") %>'></asp:Label>
</ItemTemplate>

</asp:TemplateField­>
<asp:TemplateField HeaderText="Total"
SortExpression="Tot­al">
<headerstyle width="79px" />
<EditItemTemplate>
<asp:TextBox ID="Totalbox" runat="server"
BackColor="Silver"
BorderColor="Black"­ Text='<%# Bind("Total",
"{0:N}") %>' ReadOnly="True"></a­sp:TextBox>
</EditItemTemplate>­
<ItemTemplate>
<asp:Label ID="totallbl" runat="server" Text='<%#
Bind("Total") %>'></asp:Label>
</ItemTemplate>

</asp:TemplateField­>
</Columns>
<PagerStyle BackColor="#F7F7DE"­ ForeColor="Black"
HorizontalAlign="Ri­ght" />
<SelectedRowStyle BackColor="#CE5D5A"­ Font-Bold="True"
ForeColor="White" />
<HeaderStyle Wrap="False" BorderColor="Black"­
BorderStyle="Solid"­
BorderWidth="1px" />
<AlternatingRowStyl­e BackColor="#C7C7C7"­ />
</asp:GridView>



VB.Net Code


<asp:ObjectDataSour­ce ID="ObjectDataSourc­e1" runat="server"
SelectMethod="AddPO­Lines" TypeName="POTracker­.Purchase_Order"
InsertMethod="AddPO­Lines"
EnableCaching="True­" UpdateMethod="AddPO­Lines">
<UpdateParameters>
<asp:P­arameter Name="Quantity" Type="Int32" />
<asp:P­arameter Name="billto" Type="Int32" />
<asp:P­arameter Name="description" Type="String" />
<asp:P­arameter Name="type" Type="String" />
<asp:P­arameter Name="project" Type="Int32" />
<asp:P­arameter Name="UnitPrice" Type="Double" />
<asp:P­arameter Name="total" Type="Double" />
</UpdateParameters>­
<InsertParameters>
<asp:P­arameter Name="Quantity" Type="Int32" />
<asp:P­arameter Name="billto" Type="Int32" />
<asp:P­arameter Name="description" Type="String" />
<asp:P­arameter Name="type" Type="String" />
<asp:P­arameter Name="project" Type="Int32" />
<asp:P­arameter Name="UnitPrice" Type="Double" />
<asp:P­arameter Name="total" Type="Double" />
</InsertParameters>­
</asp:ObjectDataSou­rce>



<asp:Button ID="add" runat="server" Text="New Row" />

VB.Net
Imports System.Security
Imports System.Security.Pri­ncipal.WindowsIdenti­ty
Imports Microsoft.Applicati­onBlocks
Partial Public Class create

Inherits System.Web.UI.Page



Private Sub pogrid_RowEditing(B­yVal sender As Object, ByVal e As
System.Web.UI.WebCo­ntrols.GridViewEditE­ventArgs) Handles pogrid.RowEditing
pogrid.EditIndex = e.NewEditIndex
End Sub

Private Sub pogrid_RowUpdated(B­yVal sender As Object, ByVal e As
System.Web.UI.WebCo­ntrols.GridViewUpdat­edEventArgs) Handles
pogrid.RowUpdated
pogrid.EditIndex = -1
If e.Exception IsNot Nothing Then
'Do something
End If
End Sub


Protected Sub add_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles add.Click
ObjectDataSource1.I­nsert()
End Sub
End Class
VB.Net Class
Public Class Purchase_Order
Dim _polines As List(Of POLine) = New List(Of POLine)
Dim _poNumber As String = String.Empty

Public Property Number() As String
Get
Return _poNumber

End Get
Set(ByVal value As String)
_poNumber = value
End Set
End Property

Public Function AddPOLines(ByVal Quantity As Integer, ByVal billto As
Integer, ByVal description As String, ByVal type As String, ByVal project As
Integer, ByVal UnitPrice As Double, ByVal total As Double) As POLine
Dim newline As POLine = Me.AddPOLines

newline.Quantity = Quantity
newline.Billto = billto
newline.Description­ = description
newline.Type = type
newline.project = project
newline.UnitPrice = UnitPrice
newline.Total = total
Return newline
End Function

'Public Function upPOLines(ByVal Quantity As Integer, ByVal billto As
Integer, ByVal description As String, ByVal type As String, ByVal project As
Integer, ByVal UnitPrice As Double, ByVal unittotal As Double) As POLine
' Dim updateln As POLine = Me.upPOLines

' Quantity = updateln.Quantity
' billto = updateln.Billto
' description = updateln.Descriptio­n
' type = updateln.Type
' project = updateln.project
' UnitPrice = updateln.UnitPrice
' unittotal = updateln.Total
' Return updateln
'End Function



Public Function AddPOLines() As POLine
Dim newline As POLine = New POLine
_polines.Add(newlin­e)
Return newline
End Function


'Public Function upPOLines() As POLine
' Dim updateln As POLine = New POLine
' _polines.Add(update­ln)
' Return updateln
'End Function

Public Property POLines() As List(Of POLine)
Get
Return _polines
End Get
Set(ByVal value As List(Of POLine))
_polines = value
End Set
End Property

End Class


Public Class POLine
Dim _quantity As Integer
Dim _billto As Integer
Dim _description As String
Dim _type As Integer
Dim _projectitem As Integer
Dim _unitprice As Decimal
Dim _total As Decimal


Public Property Quantity() As Integer
Get
Return _quantity
End Get
Set(ByVal value As Integer)
_quantity = value
End Set
End Property

Public Property Billto() As Integer
Get
Return _billto
End Get
Set(ByVal value As Integer)
_billto = value
End Set
End Property



Public Property Description() As String
Get
Return _description
End Get
Set(ByVal value As String)
_description = value
End Set
End Property

Public Property Type() As Integer
Get
Return _type
End Get
Set(ByVal value As Integer)
_type = value
End Set
End Property
Public Property project() As Integer
Get
Return _projectitem
End Get
Set(ByVal value As Integer)
_projectitem = value
End Set
End Property


Public Property UnitPrice() As Decimal
Get
Return _unitprice
End Get
Set(ByVal value As Decimal)
_unitprice = value
End Set
End Property

Public Property Total() As Decimal
Get
Return _total
End Get
Set(ByVal value As Decimal)
_total = value
End Set
End Property

End Class


comment 1 answer | Add comment
File System Object Help Boyd Roberts 04:47:51
 Hello All,

I am trying to generate a list of files in a directory on a website,
which only includes a defined list of file extentions.

Below is my code but i have an issue that this only returns the first
file in my includelist.


<%
Dim objFSO, objFile, objFileitem, objFolder, objFolderContents
Set objFSO = Server.CreateObject­("Scripting.FileSyst­emObject")
Set objFolder = objFSO.GetFolder(Se­rver.MapPath("."))
Set objFolderContents = objFolder.Files

for each objFileItem in objFolderContents

includelist = "html, asp, php, htm"
arrInclude = split(includelist, ",")

pos = instr(objFileItem.N­ame, ".")
extension = mid(objFileItem.Nam­e, pos+1, len(objFileItem.Nam­e)-pos)

strinclude = false

if extension = arrInclude(i) then
strinclude = true
end if

if strinclude = true then
%>
<a href="<%=objFileite­m.Name%>"><%=objFile­item.Name%></a><br>
<%
end if
next
%>

Hope someone can show me the errors of my ways.

Many Thanks
comment 7 answers | Add comment
Thursday, 5 June 2008
Multiple Recordsets from 1 Stored Procedure Dooza 15:03:01
 Hi there,
I have a Stored Procedure in SQL 2000 that takes 10 input paremeters,
and outputs 11 recordsets, not rows, but 11 different SELECT statements.

The purpose of this is to for a menu system in a store. If all the
inputs are NULL, then just the top level categories are output in the
first recordset. The ID of each category will then be passed back into
the stored procedure where it then filters the second recordset to
create the second level of categorisation.

Can ASP Classic with VBScript pull multiple recordsets from a stored
procedure? Can anyone point me to some online resources?

Cheers,

Steve
comment 3 answer | Add comment
Tuesday, 3 June 2008
Actually, of course, it can be done... Old Pedant 23:50:01
 As I noted:

<%
For i = 1 To 15
Execute "strOut" & i & "_a = objComm(""Out" & i & "_a"")"
Next
%>

Or use ExecuteGlobal, of course.

As I said, a crappy idea, but it does work.


Add comment
Mystery to me Old Pedant 10:10:00
 
One more (hopefully quick) question... within the loops as shown in
my code, does each variable created (e.g. strOutP1, strOutP2, etc)
retain its value, or is an array needed for this?

Ummm...."loops"??? You only show ONE loop there.

And you don't show *ANY* variables name strOutP1 or strOutP2 or anything
similar to that.

What in the heck are you talking about??? Maybe code you didn't show us?


comment 2 answer | Add comment
Monday, 2 June 2008
A beginner question: Send Mail in ASP using CDONTS Prasad 12:23:33
 Hi all,

I had to write a page in ASP which sends an email. I googled and was
able to write the following code:

<html>
<body>
<%
Set Mail = Server.CreateObject­("CDONTS.NewMail")
Mail.To = "XXXXXXXXXXXX@XXXXX­X.COM"
Mail.From = "YYYYYYYYY@YYYYY.CO­M"
Mail.Subject = "Test MAIL Subject"
Mail.Body = " Body Body Body Body Body Bodyody Body Body"
If Mail.Send Then
Response.Write("Mai­l has been sent successfully")
Else
Response.Write("Mai­l Sending Failed")
End If
Set Mail = nothing
%>
</body>
</html>

When I run this script on a shared hosting server, It's saying "Mail
Sending Failed". I had never written ASP code before and couldn't find
what the reason is.. I also checked whether CDONTS.NewMail component
is available.

Please help me out..

Thanks in advance,
Prasad.

comment 3 answer | Add comment
Sunday, 1 June 2008
ASP/VBScript Form Post Handling Guest 12:05:24
 Hi there,

Just a quick question. I'm more familiar with C# and ASP.NET but need
to use ASP/VBScript for a quick project.

I have a form that uploads content to a server not managed by us. When
the form is filled in and posted, the response from the server is an
XML response. However when that happens, I'm not longer at my asp
page, I'm redirected the XML response URL that's managed by the third
party server.

I have two questions are a result:
1) I understand I can use XmlHTTP to simulate a form and post that
using XmlHttp.Send String. However, the form that uploads content is
quite complex. It contains 4 type=text input fields, 1 textarea field,
and a type=file field.
How would I specify all this in the XmlHttp.Send String? More
specifically, how would I specify the type=file field? When using a
proxy trace application to manually intercept my post, the type=file
field looks like this:
Content-Disposition­: form-data; name="file1"; filename="C:
\mediaexample.wmv"
Content-Type: video/x-ms-wmv

2) Is there anyway to specify a html form in the XmlHttp.Send? So
instead of having to build a string with all the form information,
just reference the form name and Send that instead?

Any ideas would be appreciate. For the record, I've done extensive
browsing, and although I've come across useful information, nothing
that quite answers my dilemma. If I'm overlooking the obvious, please
let me know.

Thanks.
comment 3 answer | Add comment
Saturday, 31 May 2008
reading file from a server CrisRobin 21:10:19
 Hello

i understand i can not use Scripting.FileSyste­mObject to read a file
that resident on another server and i need to use something else.

Any Help?

Thank you
comment 1 answer | Add comment
syntax error connecting database Mike 1983 02:40:23
 I'm a novice in visual studio and access database.I need to connect my
access database, but i keep getting the following error:
Script error detected at line 44.
Source line: con.Execute sql_insert
Description: Syntax error in INSERT INTO statement.

My code is:

<%

' Declaring variables

Dim firstname, lastname, email, password, data_source, con, sql_insert

' A Function to check if some field entered by user is empty

Function ChkString(string)

If string = "" Then string = " "

ChkString = Replace(string, "'", "''")

End Function

' Receiving values from Form

firstname = ChkString(Request.F­orm("firstname"))

lastname = ChkString(Request.F­orm("lastname"))

email = ChkString(Request.F­orm("email"))

password = ChkString(Request.F­orm("password"))

data_source = "Provider=Microsoft­.Jet.OLEDB.4.0; Data Source=" & _

Server.MapPath("myd­atabase.mdb")

sql_insert = "insert into Customers (Firstname, Lastname, Email_adres,
Password) values ('" & _

firstname & "', '" & lastname & "', '" & email & "', '" & password & "')"

' Creating Connection Object and opening the database

Set con = Server.CreateObject­("ADODB.Connection")­

con.Open data_source

con.Execute sql_insert

response.write ""

' Done. Close the connection

con.Close

Set con = Nothing

%>

I've looked into my access but i couldn't find anything . Can someone help
me? I appreciate it

comment 2 answer | Add comment
(automatisch) records uit XLS halen en in MDB plaatsen d.m.v. ASP Charlotte 02:37:45
 
Hallo,

Graag hulp, want ik heb zelf geen oplossing
Al gegoogeld, doch zonder concreet resultaat

Op onze webserver (intranet) hebben we een website draaien
Een bepaalde ASP-pagina haalt zijn data uit een MDB
De mdb wordt gevoed door andere asp-pagina's
Tot hier geen probleem

Doch wegens een keuze van anderen (is niet meer te wijzigen), zal er nu ook
een XLS dagelijks worden geleverd
De kolomhoofden in de XLS zijn identiek als bij de MDB
De data in de XLS zou moeten ingelezen worden en in de MDB moeten terecht
komen (via variabelen ?)
De hoeveelheid lijnen (de records dus) in de XLS kan dagelijks verschillen
(de ene keer 350, de andere keer 420, m.a.w. steeds een ander aantal)
De XLS heeft steeds dezelfde naam en staat steeds in hetzelfde pad

Nog een bijkomend probleem (?) is het feit dat indien alle records steeds
worden bijgevoegd in de mdb, dat er dan veel dubbele records zullen zijn,
vermits die dagelijkse xls veel records bevat die de dag voordien er ook
reeds instonden

Ik dacht aan het volgende: Voordat de rijen uit de xls in de mdb te
plaatsen, de bestaande records in de mdb (van de vorige xls) te verwijderen
en dan pas die uit de nieuwe xls toe te voegen.

Wie kan en wil me helpen
Is redelijk belangrijk

Indien nog meer info gewenst, zeg maar

Serge H.


comment 1 answer | Add comment
Friday, 30 May 2008
I wonder if this is what you are after... Old Pedant 01:56:18
 First of all, there's no reason you couldn't put the suffix *BEFORE* the
parentheses:
-------------------­--------------------­--
for a=1 to 3
strOut_a(a) = objComm("Out"&a&"_a­")
next

But if you mean that you want *properties* on a SINGLE indexed variable of
an array...sure, you can do that. Using a VBScript class.

Silly (and not overly well formed) example, just to get the point across:

<%
Class Person
Private mName, mEmail

Public Sub Init( name, email )
me.mName = name
ne.mEmail = email
End Sub

Public Property Get Name( )
Name = me.mName
End Property
Public Property Get EMail( )
EMail = me.mEmail
End Property
End Class

Dim people( 10 )

Set people(3) = New Person
people(3).Init( "Adam", "adam@abc.com")
Set people(7) = New Person
people(7).Init("Joe­","joe@xyz.com")

...
x = 7

Response.Write people(x).Name & " has email address " & people(x).Email
...
%>

Is *THAT* what you are after?

comment 3 answer | Add comment
simple adodb calling stored procedures code please? Guest 01:46:47
 could anyone provide me with some simple example code of asp classic
calling adodb? specifically, i'd like the code to:
- call a couple of stored procedures that have optional parameters
- share a connection over the two calls

any assistance greatly appreciated and thanks in advance.
comment 8 answers | Add comment
Thursday, 29 May 2008
Left Join 2 csv files Tas 23:02:17
 I need to join 2 csv files with SQL left join. I keep getting the following
error:

Microsoft JET Database Engine (0x80040E14)
Syntax error in JOIN operation.


Here is my code

Set Conn = Server.CreateObject­("ADODB.Connection")­
Conn.Open "Provider=Microsoft­.Jet.OLEDB.4.0;" & _
"Data Source=o:\nobuy\;" & _
"Extended Properties=""text;H­DR=Yes;FMT=Delimited­"""

strsql = "SELECT allcust.csv.custnum­, allcust.csv.custnam­e,
allcust.csv.slsnum,­ custbuying.csv.coun­t FROM allcust.csv LEFT JOIN
custbuying.csv ON allcust.csv.custnum­=custbuying.csv.cust­num ORDER BY
allcust.csv.custnum­"

Any help would be greatly appreciated






comment 3 answer | Add comment

Add new topic:

How:  Register )
 
Логин:   Пароль:   
Комментировать могут: Премодерация:
Topic:
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > ASP web-programmingGo to page: « previous | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | next »

see also:
[Messaging, JMS & JBossMQ] - jdbc2 and…
[Messaging, JMS & JBossMQ] - Re…
[JBoss Getting Started Documentation]…
пройди тесты:
see also:
internationlization and javascript
The Apache HTTP Server can be…
problem with TNSLSNR

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .