
bri189a
Avatar/Signature-
Posts
1014 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by bri189a
-
C# - This is truly irritating! BUGGY?
bri189a replied to EFileTahi-A's topic in Directory / File IO / Registry
Yup, that would do it. That is TOO funny! :) -
I've said it before and I'll say it again, the first thing anyone should do when creating a VB.NET project is to remove the reference and namespace to the legacy VB6 library...
-
It depends on the provider. IBM provider does this to an extent on the AS400, SQL Provider will return to the pool...I believe that's the case, unfortunately I work with IBM more than I do the SQL server; each provider works differantly. The main thing all programmers should do, if they don't know where to research this, is to let the provider do what it does by default, it's probably the best method.
-
You do not need the following line: btnModify = CType(ucLayout.FindControl("btnModify"), Button) This is probably unsetting the control and causing the error.
-
What about MACHINENAME_IWAM account...does it have permission to? sometimes that causes permission issues.
-
Sorry, try: MyBase.RenderChildren(writer)
-
Page.RenderChildren(writer) I think is what you are looking for where you currently have writer.Write("ASDF")...didn't even know that enumeration exisited...don't do much of that sort of thing....someday I'll know it all :)....like I said earlier, we all need that kick...thanks!
-
It's okay, that's why we're here...to kick each other in the butt when we need it...PD can tell you about all the times he's kicked me in the butt! :)
-
But again, why would you pass them the connection and not just retrieve them the data that they want? You would be opening a heck of security hole passing an open ended connection string for the user...whomever it be...to use as they wish...for example: Say I have Office 2003 (which supports web services)...I'm an idiot user who thinks Excel is the best thing since sliced bread. I don't know crap about programming or connection resource management. I take that connection string and form several connection to a database and leave them open for hours at a time because I don't know any better. I distribute this application to every person in my departement, they in turn share it between other departments. The dba is asking you (the person who developed it) why every connection available to the database is locked and all are using the same connection string which ties back to you. Nobody else can access the other resources on the machine because of this and the entire infrastructure is at a halt. He's also asking why several tables, and even databases have disappeared. You're co-workers are wondering why several rows of data that are static and couldn't possibily be deleted by an enterprise application are suddenly missing. What do you tell them? Get my point????????
-
Perhaps you have a question? Us programmers are smart arses... but looking and assuming a lot from the rather vague post of yours you probably are looking at doing a DataRepeater or DataList... VS Pro has some Crystal web reports, but I've never used them and don't care to but someone out there might now something.
-
You add the control to the toolbox and after you drag it onto the form it will add the reference itself to the project.
-
I also find it interesting that if you wire up anything outside of Page_Load for a page it creates the old standard IntializeComponent function...and then you have to re-wire your Page_Load event and it will now show up in there, but if you leave the page as it originally was (with no InitializeComponent function, and no visible code to wire up the Page_Load event) the Page_Load function still gets called. So apparently they are determining if InitializeComponent is preset (reflection?) then calling that...and same with Page_Load? I can honestly say I don't like this model, I'll live with since I don't have much choice, but it's not as intuitive as the current version.
-
Okay I found out that the component designer is where I can wire up page events...but still I'd like to know about why my object that's are going to be displayed, ever, at run time, like SQL data source, aren't on the component designer.
-
Then how does it wire up events.... You use to have in the auto-generated: this.Load += new System.EventHandler(this.Page_Load) Or if you let the system wire up any new events through the IDE something similiar, I'm not see that code now and I know it must be somewhere, well that is if I could figure out even how to add a Page_Init, or Page_PreRender...from the properties windows the only objects I have is Document (which of coarse has no Events), and object I drug onto the page... Also why can't I put my SqlDataSource in the component designer...why in the world would I want it cluttering up my design view? Now I have to look at things in a browser window so I can see how it will accurately display, up until now the layout in the designer was almost the same as that as in Browser...at least IE version. Thanks PD for you help...if you know the answer to the above, let me know.
-
Okay, despite what Microsoft wants me to believe, I know there has to be some 'auto generated' code somewhere...the other half of these 'partial classes'... where are they?
-
A data reader only moves forward. You will have to use a dataset and track the index yourself....when they open the page they will be at index 0 (the first record of the table in the dataset), moving forward you set the index to 1 (now the second record is displayed), moving backward you set the index back to 0 (now the previous record is displayed), and so on...the syntax would be something like myRow = myDataSet.Tables("TableWhatever")(myIndex) And then your controls would bind to the columns of that row. Also, if you are leaving a data reader open while a user is navigating forward then you are using the data reader incorrectly. A data reader should be used to fill a data set, or a collection of objects, or anything other than for navigational purpose of data. ADO.NET is disconnected data, that is the beauty of it, the DataSet represents the source data and allows you to navigate and manipulate it without tying up database connections (which are limited and in the real world a DBA will kick you to the curb if your keeping a connection open just for navigation purposes). Follow my instructions in this post and the previous and I gaurantee it will work for you.
-
If you use a parameterized in-line SQL statement you'll do several things...one not have to have a concatenated SQL statement that two, opens you up to SQL injection attacks and a host of other problems. Better yet, increase your performance by moving into into a stored procedure.
-
Again they are probably using an IFRAME and on the server doing some browser sniffing, ip tracking and tracking the time and stuff. It's pretty elementary.
-
As a former network admin I can tell you that I would uninstall your application from every computer on my network if you pinged my servers every minute. Now if it were me I'd have a test conn.Open/conn.Close on a seperate thread as soon as the app started, by default the app would start with a 'connecting' icon. When the thread successfully opened an closed I would have it set a variable, if it didn't I would have it set the same variable...the variable would probably be enum that had the values of None, Failed, Succeeded... I would have a timer start when the app started that would fire an event every second (the timeout would be 1000). The event for that time would check that variable, if it was None I would leave the 'connecting' icon, if it failed, I'd show a 'no connection' icon, and if it succeeded I would show the 'connected' icon, I would then turn of the timer so that it doesn't run indefinitely. That's a off the top of my head idea, I'm sure on paper a better design would emerge.
-
I'd guess that the script it points to writes an IFRAME on your page which inserts the counter and handles the counting. I'd never use one, who knows what else they could be putting in that IFRAME...pop-ups to sponsored links, spyware, ActiveX exploits, etc. Those type of things could get you to lose any potential visitors pretty quick. I'd spend the 10 minutes make my own if you were thinking of going that route. A counter is a very simple thing, anybody who just doesn't want to give you the code all together but instead wants you to put in javascript that points to their site probably has some alterior motive.
-
I would change the ASP 3.0 code to ASP.NET code and the ADO code to ADO.NET code, you'll save time in the long run. But to answer you question, ASP 3.0 is filled with include files...so it's more than likely something in one of those include files is path specific as you said or something along those lines. You need to trace back to where 'Mnrdays' is coming from, and also make sure you copy of the access database matches what is on the site that you got this code from.
-
Is there a reason why you can't have the control already on the page and just change it's visiblity states? That would be a lot easier to wire up events to also.
-
It depends on your application. Several intranet application use Windows or Active Directory for Authentication, Almost every internet application will use FormsAuthentication or a variant thereof. FormsAuthentication will handle storing the user name for you. What you are discussing is Authorization...what parts of the application can a person get to once they are authenticated. There are number of ways to do this, role based authorization is usually the best way to go. Each role would be able to access certain pages. This check is generally in the Page_Load event for that page, or built into the web.config files...there are other ways but I think those are the most popular, you could make it part of your Authenticate_Request event too, I've seen that pretty often but it's not a preferance of mine to mix authetication code with authorization code, but again it's a preferance not a rule.
-
If you are using a DataGrid you can just enable paging. If you are using a DataList, DataRepeater, or something you custom made you will have to implement your own solution. If you are looking to just show one record at a time in some sort of custom solution then if it were me I would have a DataSet that I kept in session of all the records. I would have a variable that holds the current record (index) being shown, and I would have to buttons (next and previous) to move the index forward or back respectively...actually I would implement something more complicated than that but let's keep things simple. I would have the next and previous have logic checks for going past the number or records or going below 0, then my controls on the page would bind to the record of the referenced table in the dataset at the specified index. Then of coarse I would have error handling and clean up code where necessary. Hope that helps.
-
No probs...we all do it.