|
Do you mean AJAX only supports ASP.NET 2.0? where do you search from, give me the link?
<< >>
|
|
|
|
|
Hi, I have an application that is reading a DB4 file. I can take the application, run it on the machine that hosts the webserver and it reads the file just fine. I have it all setup under ODBC Data Sources. However, when I try to do the same thing on the Webserver, gives me an error trying to open the file. Using the FileMon utility from Sysinternals.com, it never attempts to open the file, at least the file I was hoping for.
So my question is how do you tell the Webserver where the file is located?
Thank you,
Glenn
|
|
|
|
|
You haven't provided enough information to answer your question.
Where and how are the file path specified. If it is in the ODBC data source on the server then you probably need to find the path on the server where the file is located and update the ODBC setting.
If it is a relative path specified by the application, using Server.MapPath("/") will give you the directory on the server at the root of your web application.
|
|
|
|
|
I selected Data Sources from the Administrative tools. I added a User DSN and a System DSN and tried adding a File DSN. However the File DSN is not showing up but if I try to add it again it tells me it already exsists.
These are DB4 databases (.DBF and .MDX) files. The files exist in the application root directory.
I have the Webserver default page set to d:\development and I have changed WWWROOT$ to also point to d:\development. I then added a Virtual Directory called MCP which exsists under D:\development. So the directory structure is d:\development\mcp. The DB4 databases are in d:\development\mcp, which is also the path information that I put into the Data Sources.
I created a simple program that is a form that has two buttons, one says "Load Merchant" and the other says "Load Userids". The code for the userids is the same for the merchants, however the table name changes. See code below:
string strCompanyName;<br />
OdbcDataAdapter odbcDataAdapter;<br />
OdbcCommandBuilder odbcCommandBuilder;;<br />
OdbcConnection odbcConnect;<br />
<br />
DataSet dataSet = new DataSet( );<br />
<br />
odbcConnect = new OdbcConnection("DSN=MCP;");<br />
<br />
try<br />
{<br />
odbcConnect.Open( );<br />
}<br />
<br />
catch<br />
{<br />
cbMerchant.Items.Add("ERROR OPENING MCP");<br />
return;<br />
}<br />
<br />
odbcDataAdapter = new OdbcDataAdapter("Select * from Merchant", odbcConnect);<br />
odbcCommandBuilder = new OdbcCommandBuilder(odbcDataAdapter);<br />
odbcDataAdapter.Fill(dataSet, "Merchant"); <br />
<br />
DataTable dataTable = dataSet.Tables[0];<br />
<br />
foreach (DataRow dataRow in dataTable.Rows)<br />
{<br />
strCompanyName = (string) dataRow["NAME"];<br />
cbMerchant.Items.Add(strCompanyName);<br />
}<br />
When I make a non-web version of the same code it works perfect, all the entries from the DB4 file gets loaded into a Combobox, yet when I run this on the Webserver, the "catch" block of code grabs it and says, "Error opening MCP".
Filemon shows no attempt at all trying to open the database on the D drive, however I had it scoped only to D, it maybe trying to open something on C:.
I don't want to hard code a file path as this can change per installation. I know I can code something in Web.config but I rather not. I was trying to use "Code Base SQL 2.0" to read the file since I had a license for it, however it was having problems reading the Merchant Table for some reason.
Glenn
|
|
|
|
|
You are catching the exception but not the exception information, so you have no clue what the error is.
Remove the try...catch while testing, or catch the exception information and re-throw it:
try {
...
} catch (Exception e) {
throw e;
}
---
b { font-weight: normal; }
|
|
|
|
|
When I throw the exception back, this is what I get:
<br />
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: Microsoft.Data.Odbc.OdbcException: ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed<br />
<br />
Source Error: <br />
<br />
<br />
Line 136: odbcDataAdapter = new OdbcDataAdapter(strSelect, odbcConnection);<br />
Line 137: odbcCommandBuilder = new OdbcCommandBuilder(odbcDataAdapter);<br />
Line 138: odbcDataAdapter.Fill(dataSet, "User");<br />
Line 139: #endregion<br />
Line 140:<br />
<br />
<br />
Source File: \\msp-webserver\wwwroot$\mcp\default.aspx.cs Line: 138 <br />
<br />
Stack Trace: <br />
<br />
<br />
[OdbcException: ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed]<br />
Microsoft.Data.Odbc.OdbcConnection.Open() +646<br />
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44<br />
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304<br />
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77<br />
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36<br />
MCP.WebForm1.pbOK_Click(Object sender, EventArgs e) in \\msp-webserver\wwwroot$\mcp\default.aspx.cs:138<br />
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108<br />
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57<br />
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18<br />
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33<br />
System.Web.UI.Page.ProcessRequestMain() +1292<br />
<br />
From what I have found on the internet, this means the driver can not connect to all types of files, but works fine without when you remove the Webserver from the picture. Not sure what makes the Webserver so special.
Any help is appreciated....
Glenn
|
|
|
|
|
I have run into this problem.
http://www.experts-exchange.com/Web/Browser_Issues/Q_21370470.html[^]
Anyone know how to fix it?
I have run MS AntiSpyware, toolbarcop and hijackthis. In toolbarcop I deleted two empty toolbar entries to no avail. All other entries look OK.
Unfortunately I don't want to subscribe to experts exchange, who look like they may have the answer.
This all happened when a colleague sent me a link to his family web site.
Kevin
|
|
|
|
|
the accepted answer
Well you wouldn't believe it! My computer has completely died and I've had to wipe the hard drive, reformat and reinstall the OS. In going through one at a time and reinstalling all my old programs over the weekend, I got to one of my favorites -- Google Desktop Search. When I reinstalled that, suddenly all my browser windows showed the DREADED white squares!! I immediately uninstalled it and everything was right back to normal!
I wrote to Google tech support, and today I received the following (the asterisks are mine):
****************
Thank you for taking the time to report this problem. We are **aware of this bug**, and our Desktop Search engineering team is working to find a solution.
We apologize for any inconvenience and hope to resolve this issue in the near future.
Regards,
The Google Team
****************
-- modified at 0:04 Friday 23rd December, 2005
|
|
|
|
|
|
Hi.
I have some problems with an ActiveX control that I have to integrate in a web page. Some methods of the control have to be called in response to events from the same control. When the page loads for the first time it works fine, but after selecting "Refresh" button of the browser (Internet Explorer) I don't receive events from the control any more, although I'm positive the object is recreated and they are being fired because I've displayed some messages in a log file from the control's code.
Any ideas?
Thanks,
Marius
|
|
|
|
|
Hi..
I want to put a page in asp ( or if not possible I could also use dot.net) to my server that will report about instant number of
> open database connection object number
> open recordset object number
> connected user number (not by counting from global.asa)
> ram and cpu used by iis...
and any usefull data like above..
where to start
karanba
|
|
|
|
|
karanba wrote: > open database connection object number
> open recordset object number
If you are using MSSQL, check out the contents of the master..sysprocesses table.
karanba wrote: > connected user number (not by counting from global.asa)
That depends on what you mean... Users are not really connected to the server other than when they are requesting a page.
---
b { font-weight: normal; }
|
|
|
|
|
Using asp.net you can get most of this information using the System.Diagnostics.PerformanceCounter class. The only potential hang up is that your page needs to have permission to read these values.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
How to send SMS through internet?
aasstt
|
|
|
|
|
IMO, You have to find an SMS provider who supplies functions (I mean APIs maybe via webservices) the what you need to do is that writting a client to access those services
Hope you get the point
<< >>
|
|
|
|
|
Dear all.
I m using dll file in my webpage using ASP.now I want my dll to generate a html file and store it into client machine using this web page.My problem is that generated file is currently saved at server.I want it must store this html file on everyone's machine who is using this webpage.Hope so you will understand my problem.I have devloped my dll file in vb.net.
help me all the way.
Urgently required!!
Uttam kumar
trickyuk001@rediffmail.com
try to be the best... whereever you go,
|
|
|
|
|
Then you have to make an ActiveX component and run it in the browser, so that it is executed on the client side. This of course requires the user to accept that the component is executed.
---
b { font-weight: normal; }
|
|
|
|
|
How can i play audio file in browser ? Does exist some HTML tags for it ? Or maybe possible to call pre-installed adio player ? Desirable with controls : Play Pause Stop FastForward Rewind
How can i implement it ?
Thank you in advance
|
|
|
|
|
Hi there,
You can use the Object[^] tag to host the player in the web page to play the audio file. You can access the methods/properties of the ActiveX player to control the funtions like Play/Stop/Pause ... using the client side script. Also you can specify the URL to download the player in the codebase attribute incase the player has not installed on the client machine. You can find some examples by using the Search functionality on the site or Googling for it.
|
|
|
|
|
Hi,
I need some help with the file upload.In my page i have one input file and when I click on a button another file upload browse should come up. the maximum upload I can do is 3.
Can any one tell how to do it???
Thanks in advance
|
|
|
|
|
Put the fields on the page, so that you can easily access them from the server code, and hide some of them using the style display:none. When you want to display another, just use javascript to change the style.display property to ''.
---
b { font-weight: normal; }
|
|
|
|
|
Does anyone know if IE6 supports "proper" pagination? I want to do printouts with IE6, with headers and footers (recurring on each page).
--
Pictures[^] from my Japan trip.
|
|
|
|
|
If by "proper" pagination you mean setting the "page-break-after:always" style works to force a new page, then yes. All you need to worry about are repeating the headers/footers for each page, and keeping everything small enough that it fits.
|
|
|
|
|
When proper I was thinking more along the lines of having IE "shrink" the page and place it between recurring footers and headers. Did that make sense? I really don't want to bother doing manual layout of header and footer, because it's bound to break sooner or later.
My problem is basically this: I write POS software for a living. That's the main problem. Receipts are normally printed on regular POS printers, e.g. 80 mm wide thermal printers. The follow up problem is that I have stubborn customers who really wants to print the receipts on A4 papers (for easier handling they claim). Basically, what they want is a receipt in an invoice-ish layout. So I figured I'd utilize IE for the rendering of such documents, since it comes with the operating system. No need to go through Crystal Reports hassles (which is a real pain in the buttocks, IMO). Does that explanation of how I want the layout make any sense?
I can live without fancy headers and footers, but it would sure give the printed stuff a far more professional look. Right now I'm using the standard headers and footers provided by IE, which can unfortunately only hold simple lines of text (you can see and modify them in the IE page setup page, and/or through a pseudo-undocumented ExecWB-feature).
Pardon my horrible english.. I've been working for 16 hours straight, and I'm about to fall asleep on the keyboard. Really, I mean it.
--
Pictures[^] from my Japan trip.
-- modified at 18:10 Monday 19th December, 2005
|
|
|
|
|
You really don't have much of an option, at least not that i'm aware of. If Things were Right with the World, you could do something like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <body> <table style="width:100%;height:100%;margin:0px;border:none;"> <thead> <tr><td> Fancy-pants header</td></tr> </thead> <tbody> <!-- put content here (in <tr><td></td></tr>) --> </tbody> <tfoot> <tr><td> Footer text </td></tr> </tfoot> </table> </body> </html>
And rest assured that the header and footer would repeat on every page, no matter how many pages tbody required.
But things aren't right, and that doesn't work in IE. So you can just add the page break CSS to the table, and make sure the stuff in tbody never takes up too much space, and that the table repeats for every page...
|
|
|
|