2,245 Posted Topics

Member Avatar for Assaulter of Bu

[code=bash] #!/bin/bash for i in *.jpg; do c1=`expr substr ${i} 1 1` c2=`expr substr ${i} 2 1` c3=`expr substr ${i} 3 1` dir=${c1}/${c2}/${c3} echo mkdir -p ${dir} echo mv $i ./$dir done [/code] You will want to test that the file name is at least 3 characters

Member Avatar for sknake
0
85
Member Avatar for darab

[code=csharp] private void button2_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dataGridView1.Rows) { if (row.IsNewRow) continue; bool hasData = false; for (int i1 = 0; i1 < dataGridView1.Columns.Count; i1++) { if (!string.IsNullOrEmpty(Convert.ToString((row.Cells[i1].Value == null ? string.Empty : row.Cells[i1].Value)))) hasData = true; } if (!hasData) { row.ErrorText = "Empty data"; …

Member Avatar for sknake
0
83
Member Avatar for jephthah

[QUOTE=jbennet;921459]yes i think[/QUOTE] Unrelated to the thread but I have always wondered why you have an american flag in your avatar but you're from scotland?

Member Avatar for annbytes
0
221
Member Avatar for lolwtf

So what is the question? How you create a C# application (if so then you're in the wrong forum) or how to open a socket in vb.net?

Member Avatar for kvprajapati
0
157
Member Avatar for sonia sardana

For simple IPC use WM_COPYDATA: [url]http://www.vbaccelerator.com/home/net/code/libraries/windows_messages/Simple_Interprocess_Communication/article.asp[/url]

Member Avatar for sknake
0
193
Member Avatar for brettu

What programming language are you using? Here is how you use parameters/variables in mssql: [code=sql] Declare @CustomerId int Select * From Customer Where CustNumber = @CustomerId [/code]

Member Avatar for sknake
0
98
Member Avatar for ctyokley

Change your queries over to using parameters so you can tell what the problem is: [code=vb.net] Imports System Imports System.Data Imports System.Data.SqlClient public class MainClass Shared Sub Main() Dim thisConnection As New SqlConnection("server=(local)\SQLEXPRESS;" & _ "integrated security=sspi;database=MyDatabase") 'Create Command object Dim nonqueryCommand As SqlCommand = thisConnection.CreateCommand() Try ' Open Connection …

Member Avatar for sknake
0
103
Member Avatar for realone

"[b]Inherits[/b] System.Windows.Forms.Form" did you intend inherits or did you mean "import"? Also use [icode]System.Windows.Forms[/icode] and dont repeat the last class name.

Member Avatar for Stevoni
0
94
Member Avatar for Arunabh Nag

It sounds like you're not updating "createConnection" with the value selected on the previous form. You probably need to upload a project so we can take a look at it. The problem you're describing is occuring outside the scope of the code you posted.

Member Avatar for sknake
0
117
Member Avatar for fadime

You typically just put a parent in the constructor: [code=csharp] public IOAnalog() { } public IOAnalog(Sensor Parent, IOAnalogType AnalogType) : this() { this._parent = Parent; this._IOType = AnalogType; } [/code] Will this not work?

Member Avatar for sknake
0
75
Member Avatar for riyas_26

[code=csharp] string xmlData = System.IO.File.ReadAllText(@"C:\test.xml"); System.IO.File.WriteAllText(@"C:\test.xml", xmlData); [/code]

Member Avatar for kameswari
0
309
Member Avatar for Arunabh Nag

[code=vb.net] Imports Microsoft.Win32 Public Class FormHeader Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ofd As OpenFileDialog = New OpenFileDialog() ofd.InitialDirectory = "C:\data" ofd.Multiselect = False If (ofd.ShowDialog() = Windows.Forms.DialogResult.OK) Then Dim connStr As String = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}", ofd.FileName) Console.WriteLine(connStr) End If End Sub End …

Member Avatar for sknake
0
223
Member Avatar for coollife

[b]I have already answered your question.[/b] Please see [url]http://www.daniweb.com/forums/thread209172.html[/url] An "Image" is stored on disk in the native "image format" which is represented with "binary". "Binary" and "Image Format" are the same thing. However a [icode]byte[][/icode] array and [icode]Image[/icode] are different in managed code. Go back to the original thread …

Member Avatar for peter_budo
0
118
Member Avatar for anuj_sharma

That doesn't really give us enough information to indicate what the problem may be other than "it doesn't work." Please give us a little more background on the issue. What I did to solve this for my master pages was putting a placeholder in the <head> tag of the master …

Member Avatar for peter_budo
0
91
Member Avatar for si01

Also -- Do you want to include log4net with your application? If you don't know what it is then the answer is probably 'no'. Even if you do know what it is I would still be tempted to say no. :)

Member Avatar for si01
1
153
Member Avatar for chirup

You have already asked this question on: [url]http://www.daniweb.com/forums/thread208362.html[/url] Please do not open new threads with the same question.

Member Avatar for sknake
0
120
Member Avatar for nikichu

This is really an SQL question. What you would do is: [code=sql] Declare @Name varchar(1), @City varchar(1), @State varchar(1) Set @Name = 'a' Set @City = 'b' Set @State = 'c' Insert Into Customer (Name, City, State) Select @Name, @City, @State Where NOT EXISTS ( Select * From Customer (NOLOCK) …

Member Avatar for sknake
0
74
Member Avatar for shekarls

[code=bash] sk@svn:~/test$ ls -al *.sql | awk '{ print $8 }' file1.sql file2.sql file3.sql [/code] If you're reading this from a file you can change it to: [code=bash] sk@svn:~/test$ ls -al *.sql >> someFile sk@svn:~/test$ awk '{ print $8 }' someFile file1.sql file2.sql file3.sql [/code]

Member Avatar for sknake
0
95
Member Avatar for Haimanti

Not necessarily. You could do this: [code=sql] Declare @CityId int, @CategoryId int Set @CityId = (select city_id from city_master where city_name= 'abc') Set @CategoryId = (select city_id from city_master where city_name='123') Insert into wines_available(name, address, city_id, category_id) values (@name, @address, @cityid, @categoryid) [/code]

Member Avatar for sknake
0
116
Member Avatar for Dimansu

You need to format the string before you populate the ListView. To get the thousand separator without decimals use: [code=c#] private void button2_Click(object sender, EventArgs e) { int i1 = 5555; Console.WriteLine(i1.ToString("N0", System.Globalization.CultureInfo.InvariantCulture)); } [/code]

Member Avatar for sknake
0
97
Member Avatar for aman_dba

It is almost certainly not because of the number of users. As you indicated SQL Server can handle hundreds of users with no problem. What you should do is run the SQL Server Profiler and watch the database activity. Also check the windows event log and SQL Server error log …

Member Avatar for sknake
0
102
Member Avatar for bhas85

What distribution or operating system are you referring to? In linux the init.d files do exactly this by writing out PID files to see if the program is still alive when it re-executes. Please provide more information.

Member Avatar for bhas85
0
150
Member Avatar for love_dude1984
Member Avatar for chirup

Please see this thread regarding to drag and drop: [url]http://www.daniweb.com/forums/thread208280.html[/url] Here is another thread in C# if you can port the code: [url]http://www.daniweb.com/forums/thread207602.html[/url] The VB code provided: [code=vb.net] Public Class FormDragDrop Private Sub FormDragDrop_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.AllowDrop = True End Sub Private Sub …

Member Avatar for Nada_ward
0
268
Member Avatar for sheara

Regex syntax varies depending on what library you are using. Is this the .NET regex or something built inside of Google Analytics?

Member Avatar for sknake
0
44
Member Avatar for coollife

Please use code tags when posting code on daniweb: [noparse] [code=c#] ...code here... [/code] [/noparse] Next -- Please stop opening duplicate thread. I have already given you the answer to that in [url]http://www.daniweb.com/forums/thread209172.html[/url] For some reason you have in your head that I am not storing the image as binary …

Member Avatar for peter_budo
-1
157
Member Avatar for TobbeK

Are you wanting to serialize items included in the ListViewItem's .Tag property, or serialize the entire listview.items collection?

Member Avatar for sknake
0
217
Member Avatar for coder2050

Hello coder 2050 and welcome to Daniweb! :) Please use code tags when you paste code on Daniweb, it helps keep the threads clean. To answer your question you will want to do something like this. Also -- Are you sure that you shouldn't be submitting form fields instead of …

Member Avatar for coder2050
0
616
Member Avatar for jmmille

Why not have a boolean "headerWritten" and set it to false. Do the dr.Read(). If headerWritten is false then write the header and set it to true. Then continue writing the detail

Member Avatar for sknake
0
1K
Member Avatar for Mongz

I have included a few methods to create the OleDb connection strings for you depending on the version of Excel. [code=csharp] 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 frmExcel : Form { public frmExcel() { …

Member Avatar for sknake
0
215
Member Avatar for imfrom51

What is "relational algebra"? Also what approaches have you tried? Post your queries here and what problems you are having with them and we will work from there.

Member Avatar for imfrom51
0
166
Member Avatar for moorcroft

Yeah ... that happens if you call that property before the session initializes. That happened to me -- I think in your Global.asax if you call it in your Application_Start it will throw that error. Check the call stack and report back where it is being called from.

Member Avatar for sknake
0
534
Member Avatar for JEESco

Is the information listed under "1 - ISP" the information they sent you on paper to configure your device or is it the ISP's router and you have another router of your own behind theirs?

Member Avatar for Freaktech
0
225
Member Avatar for Keidi

Please use code tags when posting code: [noparse] [code=vb.net] ...code here [/code] [/noparse] You need to specify the Insert, Update, and Delete queries for the dataset. Use the IDE and "Add -- New Item -- DataSet". Right click and add a table adapter. The wizard will guide you through the …

Member Avatar for Keidi
0
176
Member Avatar for bodikon

Why don't you use Microsoft SQL Server? You need to run an SQL Server as an application on a server and have the clients connect to it. You can get a free version of MSSQL. I do not advocate any of the Linux databases although they will work. You will …

Member Avatar for sknake
0
114
Member Avatar for dilake

[code=csharp] private void button2_Click(object sender, EventArgs e) { this.button2.BackgroundImage = Image.FromFile(@"C:\picture.bmp"); } [/code]

Member Avatar for dilake
0
117
Member Avatar for sohoit

I don't think there is anything you can do about this. You have to use volume purchasing licenses for the new terminal servers or use an older version of office.

Member Avatar for sknake
0
173
Member Avatar for Smirgu

[code=sql] Create Table TestTable ( SomeInt int, SomeString varchar(10) ) GO --This adds an auto number column Alter Table TestTable Add RowNumber int identity(1, 1) [/code]

Member Avatar for sknake
0
117
Member Avatar for riyas_26

Just read it from the file system with [icode]File.Read()[/icode] if you have full trust on the site.

Member Avatar for sknake
0
63
Member Avatar for InsanitySorrow

What do you mean order them? Windows Explorer orders the files in the directory based on the column you select. Unless you're talking about ordering the contents of those files based on the value in an external textfile?

Member Avatar for sknake
0
89
Member Avatar for samir1973

What is the exact error message you receive? It sounds like a datatype mismatch, truncated string, or something along those lines. The query syntax itself is OK. I verified it using: [code=sql] create table Logindls ( firstname varchar(1), lastname varchar(1), Password varchar(1), Repassword varchar(1), email varchar(1), question varchar(1), answer varchar(1), …

Member Avatar for samir1973
0
190
Member Avatar for stephen lowry

As far as I know it is impossible to use a driver to open a password protected Excel file. You have to use COM/Excel automation to access the data. The behavior is documented for ODBC but as far as I know OleDb is the same: [url]http://support.microsoft.com/default.aspx?scid=kb;EN-US;211378[/url] That also is old …

Member Avatar for sknake
0
93
Member Avatar for geetajlo
Member Avatar for alvalany
Member Avatar for Slappey

How old is the CD? They do have a shelf life: "At present, stated CD-R lifetimes are estimates based on accelerated aging tests, as the technology has not been in existence long enough to verify the upper range, 120 years. With proper care it is thought that CD-Rs should be …

Member Avatar for Slappey
0
117
Member Avatar for gavin1234

Please use code tags when you post code on daniweb: [noparse] [code=c#] ...code here... [/code] [/noparse] Can you .zip your project and upload it? You can do this my clicking "Go Advanced" then "Manage Attachments" and uploading the archive. Are you calling [icode]symmetricKey.Padding = PaddingMode.PKCS7;[/icode] in your method that encrypts …

Member Avatar for ronnyron
0
511
Member Avatar for 666kennedy

[code=c#] using System; using System.Collections.Generic; namespace daniweb { class MultiArray { private static string[] GetTestData() { List<string> result = new List<string>(); result.Add("return1.MV TE244654.MV b43tgwg.sp"); result.Add("01.62 00.83 100.76"); result.Add("01.62 00.83 100.77"); result.Add("01.60 00.83 100.78"); result.Add("--.-- 00.83 100.79"); result.Add("--.-- 00.82 100.80"); result.Add("01.63 00.83 100.81"); result.Add("01.63 00.83 100.82"); result.Add("--.-- 00.83 100.83"); result.Add("--.-- 00.83 …

Member Avatar for ddanbe
0
380
Member Avatar for Pankaj18

First: use code tags when posting your code: Secondly: This is an MSSQL question, not an ASP.NET question. The problem here is your query syntax. Third: The "not equal" operation in MSSQL is <> and not !=. You also need to select one record from your interview table to compare …

Member Avatar for sknake
-1
128
Member Avatar for NargalaX
Member Avatar for darqer

Can't you just attach the debugger to the process? It sounds like you need to redeploy but maybe someone else has another idea

Member Avatar for darqer
0
113

The End.