Topics
-
- 4 replies
- 1.1k views
I'm fairly amazed that I'm having trouble finding some code to do this. So I'm asking my fellow programmers. Here's my situation: my windows program currently has one form and several classes which each run a thread that performs specific tasks including downloading a csv file from an ftp site and consumes it into a sql server db or checks the time and performs a stored procedure which will kick off some other tasks, etc. Now certain events/errors may occur in these threads. My issue is that I create a new class and then start the thread, but am having problems when I want to send a message from the thread class to the form when an event or error occurs. I can't invoke a …
Last reply by jccorner, -
- 2 replies
- 801 views
Hi, I wondered if anyone can help me.. How do I find the dotnet version that the user is running? so for example.. If idotnet = 1 then msgbox("You are running dotnet version " + idotnet) else msgbox("Program doesn't support your dotnet version!") end if Thanks Illusion.
Last reply by Illusion, -
-
- *Gurus*
- Administrators
- 10 replies
- 12k views
Post you favourite resources for regular expressions or any expressions you find useful here. to start the ball rolling http://www.regexlib.com ps. Please try to keep posts on topic, if you have a question or problem with a particular expression request help in a new thread to stop the value of this one becoming too diluted.
Last reply by mskeel, -
-
- 1 reply
- 2.2k views
Hey, I am in need of help. I have an applet that processes an XML file to do transfer it to a SQL database. It needs to analyze the records to see if they are already in the DB, and do an INSERT or UPDATE. Here is the code that is trying to process the results of a SELECT query to pull a Primary Key field from the DB: // fetch CString machineMasterPK; rc = g_sqlMgr.Fetch(); if (SQL_SUCCEEDED(rc)) { LPCTSTR fieldname = SQL_MACHINE_MASTER_PK; if (*fieldname == _T('~')) ++fieldname; // loop to get the last one (just in case of the same MachineMaster data // was entered more than once). do { machineMasterPK …
Last reply by SteveoAtilla, -
-
- Leaders
- 6 replies
- 1.2k views
Hi im trying to write a function to split one image into a d2 image array well i got this far public Image[,] SplitImages(Image image, int rows, int columns) { Image[,] images = new Image[rows, columns]; for (int row = 0; row < rows; row++) { for (int colum = 0; colum < columns; colum++) { images[row, colum] = new Bitmap(image.Width/rows,image.Height/columns); Graphics g = Graphics.FromImage(images[row, colum]); g.DrawImageUnscaled(image, (image.Width / rows) * row, (image.Height / columns) * colum, (image.Width / rows), (image.Height / columns)); } } return imag…
Last reply by MrPaul, -
-
- 11 replies
- 1.9k views
:eek: Im trying to view an xml file with a datagrid view, and i get nothing.. I use dialog to get xml path create a dataset dataset.readxml(path) datagridview.datasource = dataset i dont know what else to try. Please help :confused:
Last reply by techmanbd, -
- 1 reply
- 785 views
I have been following a video on http://www.asp.net regarding user roles. Can anyone point me to a resource where someone has implemented the functions programatically i.e. go to their own database validate user return details and assign them to a role. Mike55.
Last reply by mike55, -
- 1 reply
- 772 views
I am trying to bind one of two queries to a DataGridView on my windows form. The query pulls in information from two tables (these tables have a master/detail relationship) and I cannot figure out how to make it work. The query will pull in several fields from the master record and several fields from the first associated detail record. Everything I have found is set up for a master/detail situation with the datagridview populated with all the detail records associated with the record from the parent table. I created the query I need and made it part of the dataset but when I try to use that query to bind to the datagridview, it is not one of the choices listed. I ho…
Last reply by lorena, -
-
- Administrators
- Leaders
- 5 replies
- 874 views
I want to inherit from a form. When I try this I find that I can add controls to the inheriting class easily through use of the Toolbox and that class's designer, and all looks OK. The code for the new controls appears in an InitializeComponent method for the inheriting class. But when I want to create an instance of the inheriting class at run time, nothing that I have done to its designer is apparent. It seems that the InitializeComponent sub of the inheriting class is not happening. An example might make this clearer: Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim f As Ne…
Last reply by snarfblam, -
-
- 2 replies
- 1.8k views
i'm having heaps of trouble trying to use a vb.net dll inside excel. I'm not sure if there's a problem with my dll code, or the way i'm referencing it in excel. I have searched up all messages i'm getting, yet coming to no end. Can someone please compile a 'hello world' dll and an excel book that calls this. Can you please post all source code so that i can see all the code in the dll / project, and the vba used to call this. Thanks, GREATLY appreciated.
Last reply by q1w2e3r4t7, -
- 3 replies
- 751 views
I have created a windows service, I have also created the Setup package for this service. When I am testing the service on my development machine I use the following cmd: installutil abc.exe to install the service. I have a number of break points in my code, and have the line Debugger.Launch() in the OnStart(). Therefore when I go to services in control panel, and start my windows service, I am asked what debugger I want to use. That is grand, no problems there, and I am able to debug my code. I then remove the line Debugger.Launch(), rebuild my project, rebuild my setup project in release mode. I then transfer the setup project files to the deployment server, an…
Last reply by shaul_ahuva, -
- 1 reply
- 746 views
Here is what I am trying to do. I am using ASP.NET 2.0. I have created a data set called Stocks data table called Data and put it in the App_Code folder. I am filling the data table from data in a csv file located on the web. I am populating the data table with the following code. This code works because I checked the record count and it shows 21 records for the Data data table. public static DataSet Convert() { WebClient Client = new WebClient(); Stream myStream = Client.OpenRead("http://mysite.com/table.csv"); StreamReader myStreamReader = new StreamReader(myStream); Stocks myStocks = new Stocks(); string lin…
Last reply by shaul_ahuva, -
- 1 reply
- 1.5k views
Is there a way to add information from an XML file into the repeater control's HeaderTemplate? I have no problem displaying XML information in the ItemTemplate but I receive the following exception when I place data in the HeaderTemplate. "Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: container" ~~~~~~~~~~~~~~~~~~~~~ Code ~~~~~~~~~~~~~~~~~~~~~~ <asp:Repeater id="rpSeries" DataSourceID="XmlDataSource1" runat="server"> <HeaderTemplate> <font size="+1"><strong>Current Sermon Series: <br /><br /> <%#XPath("Title")%> </strong></font> </HeaderTemplate…
Last reply by shaul_ahuva, -
- 0 replies
- 674 views
I'm calling a table adapter fill method to fill a dataset that is bound to a datagrid. The fill method has a parameter for an order id. The order id is set when the user picks it from a drop down list. When they pick a different id from the list I want to refresh the grid to show the new data. Right now I'm doing a complete refill of the dataset. Is there a way to just call a refresh on the table adapter to refresh the data without doing a full refill? Thanks!
Last reply by CJLeit, -
- 4 replies
- 896 views
I am looking to use a graph in my project. Does anyone use graphs here and what did you use? I looked through the ToolBar .Net Framework Components and I did not see anything there. I am looking through COM Components. But if anyone can give me some advice, that would be appreciate. Just a quick example of what I will use it for. I want Y to = Voltage and X = time. It will change when one test is done to different time for X for the next test so I will need to be able to change that.
Last reply by techmanbd, -
- 2 replies
- 4.6k views
I need to validate the first two characters of a mobile phone number. I know that the length of the number is 10 characters, and that the first two will be 0 and 8. The third character can be either 5, 6, 7, or 8. I have been going through various tutorials, but I am hitting a brick wall. Mike55.
Last reply by techmanbd, -
- 1 reply
- 619 views
I need to write a query/stored procedure where I want to get a specific number for records (say 10) from the database according to the time they are inserted into DB. I store the insert time using SYSDATE and I want to retrieve the first ten inserted records (i.e. having smallest SYSDATE value) and then delete those from DB in one transaction. If my table looks something like this: RecordNum RecordType InsertTime 10 A 10/08/2007 14:20 20 B 10/08/2007 14:22 10/08/2007 14:27 � � � Please let me know how to go about it.…
Last reply by MrPaul, -
- 7 replies
- 1.8k views
Hi, Like most developers using AJAX for the first time everything works well on my project with the exception of the back button and bookmarks. Now that all the reloading and redirecting has been removed from my pages with the help of AJAX, the history that would normally be in the browser has now gone also. I have googled for an hour looking for the best way to fix this and I haven't really found anything that seems to work yet. Can anyone help me with this please?
Last reply by davearia, -
-
- Leaders
- 12 replies
- 1.6k views
Hi Marble_Eater, Just wnated to know how you're getting on with your Dvorak keyboard... Paul.
Last reply by mandelbrot, -
-
- 1 reply
- 680 views
So I started a new thread in my C# application to run a stored procedure. Since it takes a long time to run, I want to let the user cancel this operation while the stored procedure is still running. My question is if I stop this thread, will the stored procedure (which run on a Sql2005 server) stop about the same time, or keep on going? In my case, I would like to stop that as well. Any suggestion? Thanks in advance.
Last reply by Worrow,
-
Who's Online 0 Members, 0 Anonymous, 59 Guests (See full list)
- There are no registered users currently online