2,245 Posted Topics

Member Avatar for vivek4020

[icode]int[,][/icode]: [URL="http://msdn.microsoft.com/en-us/library/2yd9wwz4.aspx"]Multi-dimensional array[/URL] [icode]int[][][/icode]: [URL="http://msdn.microsoft.com/en-us/library/2s05feca.aspx"]Jagged array[/URL]

Member Avatar for sknake
0
1K
Member Avatar for naykodi

Please use code tags when posting code/stack traces to daniweb: [noparse] [code] ...code here... [/code] [/noparse] [noparse] [code=text] ...exception here... [/code] [/noparse] Upload your application. Its hard to tell whats going wrong without seeing code. Hit "Go Advanced" then "Manage Attachments" and it will let you upload a zip.

Member Avatar for sknake
0
185
Member Avatar for sathya8819

As far as I know you can't do that easily. You could load one DLL in a separate app domain and access it via remoting. You could also "hack" one of the DLLs and change the version, namespace, name, etc. To modify a DLL you need the [URL="http://www.red-gate.com/products/reflector/"].NET Reflector[/URL] and …

Member Avatar for sknake
0
83
Member Avatar for carey_amanda

[QUOTE=ovycom;1107021]Hello I have same problem.[/QUOTE] Try creating your own thread in the C# forum to ask questions.

Member Avatar for sknake
1
111
Member Avatar for Jarq

Are you trying to store the text file as a BLOB in the database or parse the file and store values in corresponding MSSQL columns? Can you post a sample of the text file and your SQL table structure?

Member Avatar for Jarq
0
3K
Member Avatar for RoyMicro

You can also use the configuration file like you mentioned. You should have a "Settings.settings" file in the Properties\ directory of your solution. Add a new string value (leave the default value empty), then to get/set/save the config file: [code] Properties.Settings.Default.adminusername = "lastlogin"; Properties.Settings.Default.Save(); [/code] In the example above [icode]adminusername[/icode] …

Member Avatar for sknake
0
179
Member Avatar for team_ferrari22

If that functionality exists it would be in SMO: [url]http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.backupdevice_members(SQL.90).aspx[/url] I looked around but didn't see anything at a glance

Member Avatar for sknake
0
196
Member Avatar for bords

You should consider using parameterized SQL. Take a look at this thread: [url]http://www.daniweb.com/forums/thread248513.html[/url] More threads: [url]http://www.google.com/search?hl=en&source=hp&q=site%3Adaniweb.com+%2Bsknake+%2Boledbparameter&aq=f&oq=&aqi=[/url] Code: [code] const string connStr = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Bords\MyDocuments\Database1.accdb"; const string query = "DELETE From Applicants where Id = ?"; using (OleDbConnection conn = new OleDbConnection(connStr)) { conn.Open(); using (OleDbCommand cmd = new OleDbCommand(query, conn)) …

Member Avatar for bords
0
136
Member Avatar for yasirbaig

Install your favorite linux distribution then install [URL="http://en.wikipedia.org/wiki/BIND"]bind[/URL].

Member Avatar for JanBaptysta
0
50
Member Avatar for TommyTran

[B]>> Ranx[/B] Concatenating a string in a loop like that kills performance on an application. You should use a [icode]StringBuilder[/icode] or take the approach apegram did. Every time you append a character it reallocates a new piece of memory for stringsize+1. Now for small strings you can't really tell, but …

Member Avatar for Ranx
0
94
Member Avatar for DIPY

[code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb { public partial class frmListBox : Form { public frmListBox() { InitializeComponent(); } private void frmListBox_Load(object sender, EventArgs e) { PopulateDefaults(); } private void PopulateDefaults() { listBox1.BeginUpdate(); listBox1.Items.Clear(); for (int i1 …

Member Avatar for sknake
0
1K
Member Avatar for gabrielhuebsch

Take a look at [icode]CREATE AGGREGATE[/icode]: [url]http://msdn.microsoft.com/en-us/library/ms182741.aspx[/url] [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=124575[/url]

Member Avatar for sknake
0
119
Member Avatar for lewashby

[B]>>But what I'M trying to figure out is, why is there so many different versions of the same program for so many different distributions?[/B] Its no different than windows. How often does Flash, Windows, Adobe, etc prompt you for an update? Thats a different version. In Linux the version numbers …

Member Avatar for sknake
0
152
Member Avatar for RoyMicro

Yes the dispose is needed. You also need to check the dialog result. With the code you posted it will still set the filename even if the user clicks "cancel" or "X" in the dialog. [code] private void button8_Click(object sender, EventArgs e) { using (OpenFileDialog openFileDialogPreviousData = new OpenFileDialog()) { …

Member Avatar for sknake
0
501
Member Avatar for Poojasrivastava

The printing behavior client side is handled by the browser and as far as I know you cannot change this behavior without writing a browser plugin. According to a post I read it is possible for some browsers but I still do not recommend it: [url]http://www.webdeveloper.com/forum/showthread.php?t=85301[/url]

Member Avatar for pauldani
0
4K
Member Avatar for samuel_1991

[B]>>PS: I know the below query generally work but I want to remove the redudant column (ShopCartID showing 3 times)[/B] You already have the logic for joining the three tables. You need to remove the [icode]Select *[/icode] and use [icode]Select col1, col2, col3, col4[/icode].

Member Avatar for samuel_1991
0
13K
Member Avatar for tqmd1

the [icode]text[/icode] datatype is for BLOBs. You can substring the data out if you inadvertently used a blob for number storage? You can probably do this in fewer operations, but to clearly demonstrate the point: [code=sql] IF OBJECT_ID('Test123', 'U') IS NOT NULL DROP TABLE Test123 Create Table Test123 ( ID …

Member Avatar for sknake
0
153
Member Avatar for bunnyboy

Check the "Output" window of your IDE to see if an unhandled exception is being thrown. That method doesn't report progress so perhaps the file is still copying? It worked fine for me.

Member Avatar for sknake
0
135
Member Avatar for _taz_

This should clear it up for you. I did my best to mimic your table structure and values. I think the query should explain itself but let me know if you have any questions: [code] IF OBJECT_ID('tempdb..#Client', 'U') IS NOT NULL DROP TABLE #Client IF OBJECT_ID('tempdb..#Receipts', 'U') IS NOT NULL …

Member Avatar for _taz_
0
135
Member Avatar for vuyiswamb

One suggestion: [code] IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[tempdb].[dbo].[#temp]')) [/code] You can replace that with: [code] IF OBJECT_ID('tempdb..#Temp', 'U') IS NOT NULL DROP TABLE #Temp [/code] Now on to your original question .. that is a lot of code. What are you trying to do exactly? …

Member Avatar for sknake
0
165
Member Avatar for deepas

Can you post the offending queries? Please use code tags when posting code on daniweb: A workaround for the problem you have described has been posted on [MSDN](http://social.msdn.microsoft.com/forums/en-US/transactsql/thread/e66c9e71-4424-4cf3-920c-6725ffc40162/)

Member Avatar for sknake
0
84
Member Avatar for nccsbim071

How are you detecting if the application is running? That would seemingly be the problem here. Create a mutex when your application fires up then add a custom action in your deployment project for uninstallation that checks for the existence of the mutex then bails out.

Member Avatar for nccsbim071
0
449
Member Avatar for faa77

... why not use the .NET framework? You can hammer the registry with reads or implement a hook to detect changes. Take a look at [URL="http://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey.opensubkey.aspx"]Microsoft.Win32.RegistryKey[/URL].

Member Avatar for ddanbe
0
171
Member Avatar for kobi

[icode]Application.DoEvents();[/icode] is a very bad idea! :( That allows windows to pump messages in the middle of your code which leads to unexpected behavior. Invoke the messages from another thread over to your UI and let it handle the repainting.

Member Avatar for ddanbe
1
155
Member Avatar for tchiloh

Why on earth would you use PSQL? Isn't that still based on the old btrieve engine? Anyway to answer your question -- As far as I know you have to create an ODBC connection and dig up a pervasive driver from somewhere and cross your fingers that it works. Do …

Member Avatar for tchiloh
-1
162
Member Avatar for Dave Sinkula
Member Avatar for skyyforever

That depends on what type of binding source you're using. You can call [icode]DataTable.BeginLoadData()[/icode] for example to turn off notifications while you're pulling down the cursor. Post your code or upload a sample project.

Member Avatar for skyyforever
0
132
Member Avatar for mwaqas1990

If you catch an exception during creating/connecting an [icode]SqlConnection[/icode] you should [b]NOT[/b] attempt to instantiate an [icode]SqlCommand[/icode]. The exception could only be a bad connection string or failure to connect. Since you're specifying a user and password you should specify "Integrated Security=False" in your connection string: [code] using System; using …

Member Avatar for mwaqas1990
0
136
Member Avatar for farooq82

What are you attempting to print? Really if you have a raw canvas or whatever spooled up on a machine to print ... and take the same print job and create a PDF document ... you could wind up with two slightly different documents. There are some limitations to the …

Member Avatar for jbennet
0
670
Member Avatar for SteveyD

No but you can hack the assembly and change it. Get the redgate reflector: [url]http://www.red-gate.com/products/reflector/[/url] Get the Reflexil, a plugin for reflector: [url]https://sourceforge.net/projects/reflexil/[/url] Then use Reflexil to change the assemblies. Its a really daunting task. I would think leaving the method signatures or version number alone would be easier.

Member Avatar for sknake
0
92
Member Avatar for dtvonly

The [icode]ConfigurationManager[/icode] is also a handy class when it comes to access configuration files: [code] ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None) [/code] [url]http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx[/url]

Member Avatar for sknake
0
118
Member Avatar for Geekitygeek

You would have to either bind those "Selection" checkboxes to a field in the datasource or do as you mentioned and re-check the values. If you're binding to a [icode]DataTable[/icode] you should be able to add another column for the "Checked" state. Just exclude that column in your [icode]DataAdapter[/icode] or …

Member Avatar for sknake
0
276
Member Avatar for ntabb

The application dictates where the form is drawn. When the window handle is created the app can change the boundaries/location. You could find the window handle(s) from the process you started and send a message forcing the window to be repositioned: [code] using System.Runtime.InteropServices; ... [DllImport("user32.dll")] public static extern int …

Member Avatar for sknake
0
3K
Member Avatar for wasyazwan

Your file looks like a fixed-length file rather than space-delimited so I would not recommend using `Split()` but rather reading the positions. This is almost identical to your last thread except you're wanting to perform calculations. Copy the code from your last thread to read each segment of the line …

Member Avatar for wasyazwan
0
586
Member Avatar for Phen0

I wouldn't suggest doing this as a 1-liner (as shown below) but to give you an idea: [code] Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click Dim s As String = "1,2,3,4,5,6,7,8,9,10,11,12" Dim avg As Double = s.Split(",").ToList().ConvertAll(New Converter(Of String, Integer)(AddressOf Convert.ToInt32)).Average() MessageBox.Show(avg) End Sub [/code]

Member Avatar for Phen0
0
250
Member Avatar for Aritz R

This topic was covered extensively in another thread: [url]http://www.daniweb.com/forums/thread246995.html[/url] Please refer to that thread and post back here if you have any more questions.

Member Avatar for sknake
0
266
Member Avatar for koduruabhinav40

They will be served on a first-come first-serve basis. However some connections may be slower so it is possible that the 10th hit finishes before the 1st. The webserver will handle this for you. Are you experiencing a problem or just curious?

Member Avatar for sknake
0
68
Member Avatar for Tunernetwork

What you could do is stick an [icode]<iframe>[/icode] in the vbulleting page pointing it to your .NET server. It would be using two different servers but that is the only way I know of going about this.

Member Avatar for sknake
0
145
Member Avatar for flipjoebanana

You could just use [icode]grep[/icode] without the find. Use [icode]grep -l -r -i[/icode]

Member Avatar for thekashyap
0
128
Member Avatar for mona-lolly

You can also create another directory and add it to your $PATH. [code] sk@sk:~$ mkdir bin sk@sk:~$ cd bin sk@sk:~/bin$ cat >> mycommand << _EOF_ > #!/bin/bash > echo "hello, world" > _EOF_ sk@sk:~/bin$ chmod +x mycommand sk@sk:~/bin$ pwd /home/wheel/sk/bin sk@sk:~/bin$ export PATH=${PATH}:/home/wheel/sk/bin sk@sk:~/bin$ cd .. sk@sk:~$ mycommand hello, world …

Member Avatar for thekashyap
0
129
Member Avatar for Dani

I'm liking the new profile page :) I really like the new statistics that you are including. If you made every stat clickable that would be nice but just another feature request. For example on the "Community" tab page you have "Total Posts: N", then you could click on the …

Member Avatar for feoperro
3
941
Member Avatar for bajanpoet

When does your fiscal year begin? Usually that is "week 1". I would get the week number from the fiscal year and calculate forward from the previous years base date. Some companies use "the first full week in January" for example. Let me know if this is how your company …

Member Avatar for bajanpoet
0
2K
Member Avatar for josephmcnelis

Post the actual configuration files with unaltered ip/hosts and the output of when you dig the hosts you're looking up. I have helped with a number of bind setup issues and almost every time someone masks hosts/ips they make a mistake when translating to fictitious addresses. Also what do you …

Member Avatar for sknake
0
148
Member Avatar for agr8lemon

Try: [code] $query = "select * from $tbl_name where (PRINTNAME IS NOT NULL AND PRINTNAME <> '' AND Cast(PRINTNAME as varbinary) <> 0x) AND DISABLED = '0' "; [/code]

Member Avatar for sknake
0
135
Member Avatar for carey_amanda

Can you copy and paste the error message from the error dialog and post it on the thread? Please use code tags when pasting: [noparse] [code=text] ... error message here ... [/code] [/noparse]

Member Avatar for carey_amanda
0
192
Member Avatar for DIPY

You can't insert text like that. If you're only talking about small code files I would load the contents in to memory, insert the text, then rewrite the entire file. If you're talking about larger files I would create a temp file with [icode]System.IO.Path.GetTempFileName()[/icode], stream the contents from the source …

Member Avatar for sknake
0
140
Member Avatar for capiono

[code] --Drop our test stuff IF OBJECT_ID('dbo.sp_Test1', 'P') IS NOT NULL DROP PROCEDURE dbo.sp_Test1 IF OBJECT_ID('tempdb..#Table', 'U') IS NOT NULL DROP TABLE #Table CREATE TABLE #Table ( Item varchar(10) ) GO --Create a procedure CREATE PROCEDURE dbo.sp_Test1 WITH EXECUTE AS CALLER AS BEGIN Declare @retValue int IF (OBJECT_ID('tempdb..#Table', 'U') IS …

Member Avatar for mail2saion
0
189
Member Avatar for engisa

This is a bad idea, by the way, but to answer your question you could do this: [code] IF OBJECT_ID('tempdb..#Table', 'U') IS NOT NULL DROP TABLE #Table Create Table #Table ( id int, period int, [sql] varchar(7000), result int ) GO Insert Into #Table (id, period, sql) values (1, 5, …

Member Avatar for engisa
0
161
Member Avatar for Hidden-Coder

[icode]Directory.GetFiles()[/icode] wont cut it for what you're trying to do: [code] private void button2_Click(object sender, EventArgs e) { string[] files = GetFiles(@"C:\dotnetwin\", "*.cs"); MessageBox.Show("Files found: " + files.Length.ToString()); //System.Diagnostics.Debugger.Break(); } public static string[] GetFiles(string searchPath, string pattern) { return GetFiles(searchPath, pattern, default(List<string>)); } private static string[] GetFiles(string searchPath, string pattern, …

Member Avatar for Hidden-Coder
0
95
Member Avatar for k2k

I usually edit /etc/network/interfaces then [icode]ifdown eth0; ifup eth0[/icode]. I'm not at a console so i'm leery of messing around with the network settings. Let me know if that doesn't work for you.

Member Avatar for k2k
0
123

The End.