- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 4
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
55 Posted Topics
Re: > d have look at Google Maps API in Java ME and How to get Location Using Location API JSR 179 . These are also lin I want to start developing for Meego, but sigh, Qt is a bit...i dont know. Not user friendly. I need a simple app, a … | |
So this is a general discussion. I basically want to know what your experience has been like when converting a VS 2005 project to a VS 2013 project, and from .Net2 to .Net 4.5. What have you done to overcome the issues? Are there ways and means to do the … | |
Hi, for some reason I can read this file perfectly on my machine (.net framework 4.5 is installed) But when I run it on one of the servers (.net framework 4.0 is installed), i can't get the file to even open. try { // Connect to the file with the … | |
So I have quite a problem over here and its wrecking my brain. I am reading in information from a csv file. the contents (or a row to be specific) of the file looks like: 1763275,95603462,NDBKPOS 1102I,EFT930G_16,CONNECTNET SIM,ACTIVE,RESTAURANT,RFU,2014/01/30 10:15:11,RFU,RFU,UN, In the above row you will see a date. When filling … | |
Error that I get: ERROR [42000] [Microsoft][ODBC Text Driver] Undefined function 'REPLICATE' in expression. Code below: DataTable dt = new DataTable(); string tempPath = @"C:\swd\"; string strConn = @"Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=" + tempPath + @";Extensions=csv,txt"; string SqlString = "Select RIGHT(REPLICATE('0', 10) + RowNr, 10)," + "RIGHT(REPLICATE('0', 10) + … | |
Re: Those 2 are not nearly as important as understanding the language and OO itself. Coding comes afterwards, and you will pick up the syntax and uses for different types of applications (consol, wpf, etc) later. As stated earlier, understanding what is needed is the first and most important approach. | |
Re: I am not getting much from your request but a question related to a SELECT statement in SQL. Canyou maybe provide more information please? You say that you created a huge portion of the program but stuck on something related to a Select statement? There has to be more to … | |
Re: Do you know SQL? If you do, the C# part of it is rather easy... So for starters, write down a SQL statement that gets all of the information that you want, then we will help you incorporate that into a C# app, and later, when you are comfortable with … | |
Hi, I kind of hit a bump in the road with SQL and C#. I am sending information through to a stored proc like: SqlCommand TestCaseManager = new SqlCommand("TestCaseManager", thisConnection); TestCaseManager.CommandType = CommandType.StoredProcedure; TestCaseManager.Parameters.Add(new SqlParameter("@TestCaseName", TestCaseName)); if (c.Controls[2].Text.Equals(string.Empty)) {TestCaseManager.Parameters.Add(new SqlParameter("@Steps", DBNull.Value));} else {TestCaseManager.Parameters.Add(new SqlParameter("@Steps", c.Controls[2].Text));} if (UnitTester.GroupBoxCreator.SomeClass.PictureLocation.Count.Equals(0)) {TestCaseManager.Parameters.Add(new SqlParameter("@Img", DBNull.Value));} … | |
I keep getting this error: The process cannot access the file 'D:\Gasper\Netcool\GA000162.200' because it is being used by another process. And I have tried everything to safely delete this file. Everything. What Am i doing wrong? using System; using System.Net; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; … | |
Hi everyone, It might sound simple but I am having nightmares with this function What is the best way to delete a file without the machine complaining that i cannot acces the file because it is in use by another process? Is this a bug in the .net framework? Is … | |
Hi, im new to ASP.Net, just playing around with it... Got a simple question. I am trying to display my Textboxes next to my datagrid, but for some reason, it's always at the bottom of my datagrid. I playing around with this for an introduction to ASP.net. Anyway, i've tried … | |
Can anyone help me with the easiest, or most efficient way to browse through files and folders? Background: I'm trying to create a media player application, that browses through folders and when i click on a file, it must do whatever it has to with it. So i got the … | |
I created a service that watches a folder, processes the files that gets dumped into it, then after processing, it moves the files to another folder. So i copy a number of files to this folder, and every now and then, i get an exception stating that i cannot gain … | |
Re: We don't know how/what your future projects will/are grow...or how it needs to interact with these tables. | |
Hi guys, is this possible? I want to click on a picture box and test the response with a message box. Only problem is, these picture box controls only get created on runtime. public Form1() { InitializeComponent(); this.WindowState = FormWindowState.Maximized; //this.PnlViewFolders.Click += new EventHandler(pictureBox1_Click); // this.pictureBox1.Click += new EventHandler(pictureBox1_Click); }// … | |
Re: Could be that you not referencing your table properly. But why not use something similar to this? using (SqlCommand thisCommand = new SqlCommand(conn.ConnectionString)) { try { SqlCommand sqlCMD = new SqlCommand("InsertUser", conn); sqlCMD.CommandType = CommandType.StoredProcedure; sqlCMD.Parameters.Add(new SqlParameter(("@ID", SqlDbType.Int, 50, "ID")).Value = 1; sqlCMD.Parameters.Add(new SqlParameter("@userName", SqlDbType.NVarChar, 50, "UserName")).Value = userBox.Text.Trim(); sqlCMD.Parameters.Add(new … | |
Re: your naming convention is a disaster. SqlConnection c = new SqlConnection Do not use variables like a, b, c...Rather give it a name, like Conn -> it helps. A lot. | |
Ok so I do not know where this post belongs, but apparently, Java is the language that is used for Arduino boards...I thought that it would be C. I have no idea where to begin, but I am really interested in tinkering with Arduino boards. Like REALLY. So I need … | |
Dont know the application switches to my form that makes use of odbc when I close the application. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } As I step through, when it gets to components.Dispose(), it goes to private void TerminalStatus_SelectedIndexChanged(object … | |
Damn, this is so much easier in a form...Anyone know how to export from a DataSet to Csv file in a console application? string sp = "SLA2Day"; var outCsvFile = @"C:\Download Report Sheets\file.txt"; SqlCommand spcmd = new SqlCommand(sp, thisConnection); spcmd.CommandType = CommandType.StoredProcedure; DataSet dsData = new DataSet(); DataTable dt = … | |
Can it be done? <asp:MenuItem Text="Queries" Value="Queries"> <asp:MenuItem Text="New Query" Value="New Query"></asp:MenuItem> <asp:MenuItem Text="Search Queries" Value="Search Queries"></asp:MenuItem> <asp:MenuItem Text="Open Queries" Value="Open Queries"></asp:MenuItem> <asp:MenuItem Text="Resolved Queries" Value="Resolved Queries"></asp:MenuItem> <asp:MenuItem Text="Closed Queries" Value="Closed Queries"></asp:MenuItem> <asp:MenuItem Text="Cancelled Queries" Value="Cancelled Queries"></asp:MenuItem> </asp:MenuItem> Thanks | |
Hi, can anyone help me with paging on a gridview please? <asp:GridView ID="GridView1" CssClass="gridStyle" runat="server" AutoGenerateColumns="false" CaptionAlign="Bottom" GridLines="Horizontal" onselectedindexchanged="GridView1_SelectedIndexChanged" OnRowEditing="GridView1_RowEditing" ShowFooter="False" AlternatingRowStyle-BackColor="White" onrowcreated="GridView1_RowCreated" RowStyle-HorizontalAlign="Center" AllowPaging="True" onpageindexchanging="GridView1_PageIndexChanging" PageSize="5"> <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <Columns> <asp:CommandField ShowEditButton="True" ButtonType="Button" ItemStyle-Width="40px" ControlStyle-CssClass="button" ControlStyle-Width="43px" ItemStyle-HorizontalAlign="Center" /> <asp:CommandField ShowSelectButton="True" ButtonType="Button" ItemStyle-Width="40px" ControlStyle-CssClass="button" ControlStyle-Width="43px" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField DataField="ID" … | |
Re: OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + FileAddress.Text + ";Extended Properties=\"Excel 12.0;HDR=YES;IMEX=1;MAXSCANROWS=0\""); OleDbDataAdapter myCommand = new OleDbDataAdapter(" SELECT TERM_NR FROM [To be Scheduled$]", conn); try { AddTermTable.Clear(); myCommand.Fill(AddTermTable); AddTermGrid.DataSource = AddTermTable; QuanCount2.Clear(); string NumOfDevices = AddTermTable.Rows.Count.ToString(); FileName = NumOfDevices; } catch (Exception ex) { string exce = ex.Message; } finally … | |
Re: ok, im not sure what you want, but i'll try. Your question is, you want to insert data into an existing table? Your SQL command "select into" creates a new table of data, that is not the command that you should be using. You can write an "INSERT INTO (select … | |
Re: Or you can write a sql command that writes a file with all the data that you selected. If it must be in c#, create a SProc that writes this file, then call it through your c# app. Keep SQL in SQL. | |
Re: What error do you get? I also don't see how you can get an error for this. | |
Re: > reReadOnlyRecommended parame Run the app a couple of times, open task manager and look for the excel process. if there are many, then its an interop prob, you need to force a GC on it. First check that, and if that is the case, then i will provide you … | |
Re: The best place to get your answer forthese types of questions: h.t.t.p://www.hardwaresecrets.com/article/How-a-CPU-Works/209 Get rid of full stops in http. | |
Re: No video is going to help you code. You have to do this the hard way, struggle to learn. There are no short cuts. What mini projects to code? look for something that can make repetitive tasks easier, automated...play around with reading data from excel files, or whatever type of … | |
How come I cant find this anywhere???? I've tried everything but posting here. Please help. I've got VS 2010 Ultimate...Sigh. I even tried it at work. | |
Re: int count = 0; increment the count by 1 during each loop then you mod count. if count mod 5 = 0 then writeline. Something like that. | |
Re: well, why dont you just select the columns that you want to see, then bind them??? Are you using OLEDB or SQLCommand? OLEDB: OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + FileAddress.Text + ";Extended Properties=\"Excel 12.0;HDR=YES;IMEX=1;MAXSCANROWS=0\""); OleDbDataAdapter myCommand = new OleDbDataAdapter(" SELECT [Terminal Numbers] FROM [To be Scheduled$]", conn); try { … | |
Ok so here's the thing, I used to read in data from an excel file and bulk copy this data into a SQL table and everything worked fine. But now, my source file changed, so now i get data from a other excel file. Both file look exactly the same, … | |
Re: read in the CSV file with string strConn = @"Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=C:\Download Report Sheets\Monitor Detail\;Extensions=asc,csv,tab,txt"; Bind to datagrid then bulkcopy. using (SqlBulkCopy bulkCopy = new SqlBulkCopy(thisConnection)) {// Bulk Copy the data from the data table into the Release Table bulkCopy.DestinationTableName = "tbl_" + Release + "_REPLY"; try { … | |
Hi All, Is there there a way for me to add a portable database to an application? In other words, i want to install my application on a other pc, then during install, the database must be stored or installed somewhere on that pc. Im just thinking of sorting this … | |
Hi there, 1) So i have a Menu Strip, and a couple of user controls, and in these user controls, i have group boxes. So when I click on the item that I want in my menu strip, it displays as normal. That's working fine. What I am trying to … | |
Re: you need not use a GC to fix your problem, i had the same issues with a csv file. you not closing it properly. | |
Ok so basically, when executing addTerminalsToolStripMenuItem_Click, i want the groupbox to replace the one in scheduleTerminalsToolStripMenuItem_Click and vice versa. If i dispose of these controls, then i cannot call the controls during run time again. [CODE] private void addTerminalsToolStripMenuItem_Click(object sender, EventArgs e) { AddTerminals AddTerm = new AddTerminals(); this.Controls.Add(AddTerm); } … | |
So now that im using excel 2010 and saving data in .xlsx format, I have a problem doing something very simple, like reading the file and trying to run a simple sql command on it... [CODE]SqlConnection con = new SqlConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Download Report Sheets\Schedule List\SoftwareDownload_OS732_20120306.xlsx;Extended Properties=Excel 12.0 Xml;HDR=YES"); SqlDataAdapter da = … | |
Re: its takes the same amount of data when downloading. But the webpage loads some additional info, like adverts and user comments and all that. | |
Re: It's not good to use interops, simply because of this issue that you are experiencing. It usually takes a while for the interop process to dispose, if you open task manager then you would see the process starting, when using the interop with excel, the excel process starts and displays … | |
Re: Dispose? I had a similar problem with interops and had to force a GC. | |
Re: copy and pasted from a other thread, works for CSV. For excel, you going to have to use interops, and also force a GC to make sure the process is closed. 1) read csv, create odbc connection to treat the csv as if it was a table itself. Store to … | |
Re: Please use the code wrap function. Messagebox your selection of text from the combobox with [CODE]MessageBox.Show(combobox1.text);[/CODE] just to see if it displays the selected text. | |
Re: Regex. using System.Text.RegularExpressions; [CODE]Match match = Regex.Match(yourString, @"([0-9]+)\$", RegexOptions.IgnoreCase);[/CODE] | |
Re: 1) read csv, create odbc connection to treat the csv as if it was a table itself. Store to datagrid if you want(for viewing purposes) [CODE] string tempPath = @"path"; string strConn = @"Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=" + tempPath + @"\;Extensions=asc,csv,tab,txt"; OdbcConnection conn = new OdbcConnection(strConn); OdbcDataAdapter da = … | |
So i have a datagrid and I have a databindingsource control for my text file. Works like a bomb, but then i added a toolstripmenu so that i can right click on the datagrid, a menu pops up and i can delete the row of data from the text file … |
The End.