Saturday, 14 June 2008
|
| 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?
|
| | 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?
|
| | 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.ServerVariables("HTTP_REFERER")); var orig_url = String(Request.ServerVariables("HTTP_REFERER"));
var session = "<session id='new'></session><errors></errors>"; var requator = Server.CreateObject("Requator.clsDoItAll");
if (requator.Init(session)) { var retval = requator.OnStart(); if (retval == "OK") { if (url.indexOf("action=detail") > 0) { url = url.replace(/requator.asp/i,"Detail.asp"); url = url.replace(/&action=detail/i,""); } if (url.indexOf("action=add") > 0) { url = url.replace(/requator.asp/i,"Add.asp"); url = url.replace(/&action=add/i,""); } if (url.indexOf("action=copy") > 0) { url = url.replace(/requator.asp/i,"Copy.asp"); url = url.replace(/&action=copy/i,""); } if ((url.indexOf("action=Maintenance") > 0) || (url.indexOf("action=maintenance") > 0)) { url = url.replace(/requator.asp/i,"Maintenance.asp"); url = url.replace(/&action=maintenance/i,""); } url += "&save=true"; %> <script type='text/javascript'> var orig_url = "<%=orig_url%>"; var url = "<%=url%>"; top.fraBottom.fraRight.location.replace(url); </script> <% } } %>
Thanks,San.
|
| | 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?
|
| | 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
|
| | 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=Home being www.site.com/home/. One of the workaround I know is to use MS XMLHTTP request on www.site.com/home/index.asp page which will get the HTML content of www.site.com?page=Home. 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.
|
| | 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
|
| | 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!
|
| | 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.
|
| | 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="Center" BackImageUrl="~/POTracking/images/buttontemplate.jpg" Font-Names="Calibri" DataSourceID="ObjectDataSource1"> <FooterStyle BackColor="#CCCC99" /> <RowStyle BackColor="#E1E3EC" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Font-Names="Calibri" HorizontalAlign="Center" /> <Columns>
<asp:CommandField ButtonType="Image" DeleteImageUrl="~/POTracking/images/Deletesmall.png" ShowCancelButton="False" ShowDeleteButton="True" ShowEditButton="True" EditImageUrl="~/POTracking/images/Document.png" ShowInsertButton="True" UpdateImageUrl="~/POTracking/images/Sync.png" /> <asp:TemplateField HeaderText="QTY" SortExpression="Quantity"> <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="Billto" > <headerstyle width="85px" /> <EditItemTemplate> <asp ropDownList ID="billtobox" runat="server" DataSourceID="billto" DataTextField="name" datavaluefield="id" Width="79px" SelectedValue='<%# Bind("Billto", "{0}") %>' appenddatabounditems="true"> <asp:ListItem Value="0">Select</asp:ListItem> </asp ropDownList> <asp:SqlDataSource ID="billto" runat="server" ConnectionString="<%$ ConnectionStrings OTracking %>" SelectCommand="billto" SelectCommandType="StoredProcedure"></asp:SqlDataSource> </EditItemTemplate> <ItemTemplate> <asp:Label ID="billtolbl" runat="server"></asp:Label> </ItemTemplate> </asp:TemplateField>
<asp:TemplateField HeaderText="Description" SortExpression="Description"> <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="Type"> <headerstyle width="44px" /> <EditItemTemplate> <asp ropDownList ID="typebox" runat="server" width="40px" appenddatabounditems="True" DataSourceID="seltype" DataTextField='typeabbr' DataValueField="id" SelectedValue='<%# Bind("Type", "{0}") %>'> <asp:ListItem Value="0">Select</asp:ListItem> </asp ropDownList> <asp:SqlDataSource ID="seltype" runat="server" ConnectionString="<%$ ConnectionStrings OTracking %>" SelectCommand="type" SelectCommandType="StoredProcedure"></asp: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="project"> <headerstyle width="110px" /> <EditItemTemplate> <asp ropDownList ID="projbox" runat="server" DataSourceID="Projectrd" DataTextField="name" DataValueField="Projectid" width="106px" SelectedValue='<%# Bind("project", "{0}") %>' appenddatabounditems="true"> <asp:ListItem Value="0">Select</asp:ListItem> </asp ropDownList> <asp:SqlDataSource ID="Projectrd" runat="server" ConnectionString="<%$ ConnectionStrings OTracking %>" SelectCommand="proj" SelectCommandType="StoredProcedure"></asp:SqlDataSource> </EditItemTemplate> <ItemTemplate> <asp:Label ID="projlbl" runat="server" Text='<%# Bind("project") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Unit Price" SortExpression="UnitPrice"> <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="Total"> <headerstyle width="79px" /> <EditItemTemplate> <asp:TextBox ID="Totalbox" runat="server" BackColor="Silver" BorderColor="Black" Text='<%# Bind("Total", "{0:N}") %>' ReadOnly="True"></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="totallbl" runat="server" Text='<%# Bind("Total") %>'></asp:Label> </ItemTemplate>
</asp:TemplateField> </Columns> <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /> <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /> <HeaderStyle Wrap="False" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" /> <AlternatingRowStyle BackColor="#C7C7C7" /> </asp:GridView>
VB.Net Code
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="AddPOLines" TypeName="POTracker.Purchase_Order" InsertMethod="AddPOLines" EnableCaching="True" UpdateMethod="AddPOLines"> <UpdateParameters> <asp arameter Name="Quantity" Type="Int32" /> <asp arameter Name="billto" Type="Int32" /> <asp arameter Name="description" Type="String" /> <asp arameter Name="type" Type="String" /> <asp arameter Name="project" Type="Int32" /> <asp arameter Name="UnitPrice" Type="Double" /> <asp arameter Name="total" Type="Double" /> </UpdateParameters> <InsertParameters> <asp arameter Name="Quantity" Type="Int32" /> <asp arameter Name="billto" Type="Int32" /> <asp arameter Name="description" Type="String" /> <asp arameter Name="type" Type="String" /> <asp arameter Name="project" Type="Int32" /> <asp arameter Name="UnitPrice" Type="Double" /> <asp arameter Name="total" Type="Double" /> </InsertParameters> </asp:ObjectDataSource>
<asp:Button ID="add" runat="server" Text="New Row" />
VB.Net Imports System.Security Imports System.Security.Principal.WindowsIdentity Imports Microsoft.ApplicationBlocks Partial Public Class create
Inherits System.Web.UI.Page
Private Sub pogrid_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles pogrid.RowEditing pogrid.EditIndex = e.NewEditIndex End Sub
Private Sub pogrid_RowUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdatedEventArgs) 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.Insert() 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.Description ' 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(newline) Return newline End Function
'Public Function upPOLines() As POLine ' Dim updateln As POLine = New POLine ' _polines.Add(updateln) ' 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
|
| | 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.FileSystemObject") Set objFolder = objFSO.GetFolder(Server.MapPath(".")) Set objFolderContents = objFolder.Files
for each objFileItem in objFolderContents
includelist = "html, asp, php, htm" arrInclude = split(includelist, ",")
pos = instr(objFileItem.Name, ".") extension = mid(objFileItem.Name, pos+1, len(objFileItem.Name)-pos)
strinclude = false
if extension = arrInclude(i) then strinclude = true end if
if strinclude = true then %> <a href="<%=objFileitem.Name%>"><%=objFileitem.Name%></a><br> <% end if next %>
Hope someone can show me the errors of my ways.
Many Thanks
|
| | 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
|
| | 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?
|
| | 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@XXXXXX.COM" Mail.From = "YYYYYYYYY@YYYYY.COM" Mail.Subject = "Test MAIL Subject" Mail.Body = " Body Body Body Body Body Bodyody Body Body" If Mail.Send Then Response.Write("Mail has been sent successfully") Else Response.Write("Mail 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.
|
| | 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.
|
| | 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.FileSystemObject to read a file that resident on another server and i need to use something else.
Any Help?
Thank you
|
| | 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.Form("firstname"))
lastname = ChkString(Request.Form("lastname"))
email = ChkString(Request.Form("email"))
password = ChkString(Request.Form("password"))
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("mydatabase.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
|
| | 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.
|
| | 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?
|
| | 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.
|
| | 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;HDR=Yes;FMT=Delimited"""
strsql = "SELECT allcust.csv.custnum, allcust.csv.custname, allcust.csv.slsnum, custbuying.csv.count FROM allcust.csv LEFT JOIN custbuying.csv ON allcust.csv.custnum=custbuying.csv.custnum ORDER BY allcust.csv.custnum"
Any help would be greatly appreciated
|
| | 3 answer | Add comment |
|
| Re: repeating dialog box problem - "Do you want to open or save th Shalom 21:08:11 |
| | Thank you for the info. Could you enlighten how to go about that?
"s_m_b" wrote:
=?Utf-8?B?U2hhbG9t?= <Shalom@discussions.microsoft.com> wrote in news:F35A1CAA-67C9-4492-80B7-5DCA1B4BC748@microsoft.com: I have installed iis 7 on my win vista home premium Sony Vaio laptop, and then tried executing downloaded sample working asp scripts in the wwwroot directory to try out. The first asp script opened fine. When I tried to click the link from the first asp script calling a second asp script, it just goes into a repeating dialog box, asking "Do you want to open or save this file", but without opening or executing the script, even though I kept Usually means you haven't set the web server up to run asp or .net (aspx) as scripts. You have to check that there is a listed association between the file extension and asp/.net |
| | 1 answer | Add comment |
|
| repeating dialog box problem - "Do you want to open or save this f Shalom 17:59:25 |
| | I have installed iis 7 on my win vista home premium Sony Vaio laptop, and then tried executing downloaded sample working asp scripts in the wwwroot directory to try out. The first asp script opened fine. When I tried to click the link from the first asp script calling a second asp script, it just goes into a repeating dialog box, asking "Do you want to open or save this file", but without opening or executing the script, even though I kept clicking on "OPEN".
|
| | 1 answer | Add comment |
|
| ASP VBScript insert / Update and sign Gtn170777 02:28:05 |
| | Hi guys,
Your expertise would be so appreciated on this one, I'm using CS3 and MS SQL server,
There is a field where a user may need to enter the pound sign, for instance " 24,000 per annum plus benefits" etc
The problem is that somewhere during the insert update it changes the pound sign to either a #hash or it inserts the value without the pound sign...
The page lauguage is -
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
the details in the head section are
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script type="text/javascript" src="../Scripts/currentdate.js"></script> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
The SQL Collation is SQL_Latin1_General_CP1_CI_AS
I'm kind of at a loss as to what the problem is with the pound sign??
Is there maybe a way or catching and changing the sign before insert or update??
PLEASE -- PLEASE help
thanks
|
| | 1 answer | Add comment |
|