602 Posted Topics
Re: I agree you must be entering the wrong syntax... e.g. I want to find the difference between date1 and date2 in *days*, datediff( *day*, date1, date2) I want to know the difference in *Hours* datediff( *hour*, date1, date2) | |
Re: I think you are looking for a more complex answer than it really is, think of the Internet as a highway. Generally at 5 am there are very few cars (data packets?) travelling down it and traffic flows freely where as at 5pm, there are more cars and the traffic … | |
Re: Hi if you want to concatinate two values as a single string, then you're half way there. next step is in the Database to configure the field to be a char or varchar field ( or equivalent depending on Database) and simply pass textbox1.Text in as a string. | |
Re: Why not post your code? It will be easier to identify where you are going wrong... | |
Re: I'd try looking at the date format, I always try to pass date values into my databases as YYYY-MM-DD (2012-05-03) or DD-MMM-YYYY (03-May-2012) formats to avoid confusion with the U.S. (wrong) date format and the civilised one ;-) i.e. mm/dd/yyyy (05/03/2012) vs dd/mm/yyyy (03/05/2012) dim formatedDate as string .... formatedDate … | |
Re: Hi, A couple of ways, try this for starters: dim DR as SQLDataReader dim cmd as SQLCommand cmd = New SqlCommand("SELECT Column FROM table", DBconnection) DBconnection.Open() DR = cmd.ExecuteReader() If DR.HasRows Then Do While DR.Read() MyComboBox.Items.Add(DR.GetString(0)) Loop end if DR.Close() | |
Re: Should your code not be something like `subtractequals.Text = Val(subtract1.text) - Val(subtract2.Text)`? Instead of `subtractequals.Text = Val(subtract1.text) - (subtract2.Text)`? In otherwords, you are telling the code the first textbox text is a numeric value and then are subtracting the second textbox text (which is a string...) | |
Re: Hi For Question #1 don't forget to include the points at the other end i.e. do you want floor mounted sockets? or Wall mounted? Where do you want them in relation to each desk? how many sockets should each person get? E.g. one point for data and another for the … | |
Re: Hi I use the SubversionEdge Kit from Collab net it sets up the Server for you, running through apache. BUT They also over the CollabNet Desktop for Subversion and ANKH SVN. I think this is what you are actually looking for, the desktop will let you connect to your subversion … | |
Hi All, I know this may seam odd but I'm getting an error navigating through a datagrid of an invalid cast. The trouble is it is of the same types!! I working on customising some Sage code and in the form there is a datagrid that is populated by a … | |
Re: Hi, I'd use one of the many free scren scraper tools there are out there and save myself the bother.... you can get them to export to csv or xml and take the file into read.... | |
Re: Hi This link should help you [URL="http://msdn.microsoft.com/en-us/library/ms178207.aspx"]http://msdn.microsoft.com/en-us/library/ms178207.aspx[/URL] It really depends when you want the script to run, In response to an event or automatically after the page loads? Your code looks like you are trying to do both with the same script.... The RegisterStartupScript creates a Script block at the … | |
Hi, I'm writing a routine to import salesorders from an Excel sheet into Sage. The Sheet is broken down by product rather than by order so I want to use OLEDB to connect and run a query against it sorting by Order Number to get the items back per order. … | |
Re: What is dsStudent, I assume it is a dataset but I cant see you initialising it or declaring it. I se you opening a connection string then suddenly you're setting datatables.... | |
Re: Windows Task Manager Get it to run your code / app at the time of day you need. Else you will have to design something in the app which would need to be running all the time to trigger at the right time. | |
Re: Hi Why go to the bother of processing in a Vb DLL? Why not on form submission apply your checks on the client side and then divert to the page accordingly this will save you a round trip to the server and be alot faster or maybe I'm missing something … | |
Re: Hi, I'd say you would have to contact the company directly. It would be a very silly security company that let random people encode and decode their security cards - they'd be giving you the keys to the kingdom! | |
Re: Hi I've never done this but I'd suggest (if it is a viable option for you,) looking into importing the RTF into a Word object then you can access print dialog etc thorugh word and it should also automatically format the text for you. | |
Re: This may help too: [URL="http://support.microsoft.com/kb/316383"]http://support.microsoft.com/kb/316383[/URL] | |
Re: Hi You will need to use office automation or the likes, it is not as simple as as text file where you append lines of plain unformatted text. You may have to create a new blank word doc and populate it with the source of the other two. Try starting … | |
Re: [QUOTE=dorkwad;1105302]Hey, i'm trying to have 2 browse file dialog boxes, one that allows you to select a file from a folder, and the other folder should allow you to chose the location to copy the file to. Thanks[/QUOTE] Hi You want to use an OpenFileDialog box for the Selection and … | |
Re: Hi As well as using parameters, I'd limit the size of text that can be put in to the textbox. I'd also either parse the text for and characters you'd expect to see in a SQL injection attack such as the sql delimiter ";" and reject or replace them with … | |
Hi All, I have to deliver a secure web ASP.net site that after 20 minutes of inactivity wipes the users sessions and forces then to login again. I have set up all the necessary timeouts on the server and at the top of each of my master pages I have … | |
Re: Hi, Not sure what you mean [CODE] sub CancelButtononclick() Mydropdownlist.items.clear Mydropdownlist.visible =false end sub sub loadbuttonClick() Dim it As Integer For it = 0 To 1000000 DropDownList1.Items.Add(it) Next ENd Sub [/CODE] | |
Re: Hi, I would not do it that way, you are taking a round trip to the server to check if something has been filled in then trying to close the browser window if it hasn't? Or is it a security feature? In which case, if they haven't logged in why … | |
Re: Hi If you are in a loop and want to increase the size of an array by one each time you can use the Ubound value like so Single dimension array: [CODE] Dim MyArray(0) for i =0 to Mylimit redim preserve MyArray(ubound(MyArray)+1) 'Actually Ubound(Array, Dimension) but by default it is … | |
Re: Hi, Your query has no joins, look up INNER JOIN and OUTER JOIN in Google. Basically JOIN tells your query how to join the tables together - you can do it by the where clause as you have done but something in your query is causing an ambiguous join… What … | |
Re: hi [CODE] MyLinklabel.backcolor = red [/CODE] Here is a link to all the system colours [URL="http://msdn.microsoft.com/en-us/library/system.drawing.color.aspx"]http://msdn.microsoft.com/en-us/library/system.drawing.color.aspx[/URL] | |
Re: Hi, If your application pool is recycled then it can affect your sessions, you need to set the application pool recycle on the Application pool that your site is using in IIS - be aware other sites could also be using the same pool, so it maybe worth putting your … | |
Re: Hi, It could be a permissions error, naturally enough your AD is well protected - i'd never recommend querying it directly from a web page you're better building a comm object or something to do it for you and then just pulling back the data from that. | |
Re: Hi SQL Server supports DatePart so if you are actually storing your dates as date type values then: [CODE] SELECT DatePart(month, Mytable.MyDateValue) As TheMonth FROM MyTable [/CODE] Also I've fairly sure I've seen MONTH() used as well: [CODE] SELECT MONTH(MyDate) As TheMonth From MyTable [/CODE] Both of these will give … | |
Hi We have two identical web servers in a farm and I need them to be able to share Session variables as I do not know which machine the user will be using at any given time i.e. if a user where to log in to a site on server1 … | |
Hi All, I have a section of my site that allows users to upload and download files. For security issues, We use a com object to take the file as a binary stream and store it on our network off of the web server (under a different randomly generated file … | |
Hi guys, This one is a bit out of left field but someone somewhere must have tried this before. Does anyone out there know how to control the width of the filepath textbox in a fileupload control? I have a form with a comment textbox, a filetype dropdown and a … | |
Re: Hi, As Debasisdas subtly points out, where do you populate DS? In your code you've given us so far DS is an unnamed, empty dataset so where is DS.Tables("Employees") coming from? If you haven't populated DS then the DS.Tables collection is empty and you can not add data to a … | |
Re: Hi WOAWW!! if you want to sych two databases DO NOT USE Auto Numbers for Primary KEYs Actually do not use Access, SQL Server is far more sophisticated at handling this ( SQL Express is free too) If you've no choice but to use Access then you will need to … | |
Re: Hi, I got a good free third party tool called Webchart to do this, [URL="http://www.carlosag.net/Tools/WebChart/"]http://www.carlosag.net/Tools/WebChart/[/URL] Before I was looking at trying to embed / use Excel - messy... and requires Excel on your server. The webchart generates a chart object as a graphic for you so no need of excel … | |
Re: Hi, Are you trying to get the page to validate something else on th form e.g. a textbox before uploading the file? If so, you do your validation client side that way you will not lose your file path as the form will not be submitted like this: [CODE] 'on … | |
Hi I'm writing a site that allows users to download documents securely stored on the network off of the web server. I'm using a com object on the server that we've been using here for ages that fetches the file from the network in a binary stream thus preventing user … | |
Re: Hi I'll start you off in the right direction, look up the System.IO class | |
Re: Hi I'm not going to tell you Exactly how to do it (you can research it,) but I'll give you a rough outline: 1. Open/ create a csv file 2. Loop through each row in the datagrid 3. for each cell in each row, add it's value to a comma … | |
Re: Reinstall Visual studio ?? | |
Re: hi [CODE] mybutton.CommandArguement = mydropdown.selectedvalue [/CODE] | |
Re: Hi, We use a free object called freetextbox (try googling) it is easy to set up and use (just register the DLL) Only thing is if someone pastes in text from Word you get that horrible Word HTML.... There is tool we now use Editor from Teleriks but although it … | |
Re: hi, Add the following to your page_load event: [CODE] Page.MaintainScrollPositionOnPostBack = True [/CODE] | |
Re: Hi Does the user account the application is running under (you can check and configure this under IIS) have read & write permissions on the directory? Also is this for an Intranet site or a web site? The reason I'm asking is do you really want to give someone on … | |
Re: Hi One thing I noticed was you commented out the line where you defined dr as as SQLDataReader but I don't see: [CODE] dim dr as OleDbDataReader [/CODE] So how does your code know what dr is supposed to be? | |
Hi Ever had the situation where you need to make a copy of a Datatable? Or where you wish to copy a datarow from one datatable to another? Well here is how by using [B]Clone[/B], [B]Copy[/B] and the [B]ImportRow[/B] DataTable Methods. | |
Hi I thought I'd share this with you all as it is really quite simple but I spent ages looking for it. I have an ASP.Net App with a master page containing a tree view that holds a heirarchy of data (as opposed to site naviagation) What I wanted was … |
The End.