2,245 Posted Topics

Member Avatar for mr_scooby

[code] IF OBJECT_ID('tempdb..#NewOrders', 'U') IS NOT NULL DROP TABLE #NewOrders IF OBJECT_ID('tempdb..#Parts', 'U') IS NOT NULL DROP TABLE #Parts Create Table #NewOrders ( PartId varchar(10) PRIMARY KEY, number_of_parts int ) Create Table #Parts ( PartId varchar(10) PRIMARY KEY, [Description] varchar(100), Cost money ) Insert Into #Parts (PartId, Cost, [Description]) Values …

Member Avatar for mr_scooby
0
155
Member Avatar for mbuckhurst

Have you reviewed the windows event log for error message? IIS is usually pretty good at spitting out errors.

Member Avatar for mbuckhurst
0
175
Member Avatar for SanmGuy

[B]>>"the second time I cannot delete all table to import it again from the beginning because of these extra fields"[/B] What are the extra fields? This is going to be a very processor intensive task :) Depending on what the data looks like and the type of comparisons you need …

Member Avatar for SanmGuy
0
181
Member Avatar for Gerbilkit

Your file has 6 fields in it and you only gave 5. I'm guessing you left the tax rate out. Can you give an example of one line of sample data, all of the calculations, and the expected output?

Member Avatar for Aia
0
115
Member Avatar for OldQBasicer

Try posting your code here so we can see the issue. Be sure to use code tags: [noparse] [code] ...code here... [/code] [/noparse]

Member Avatar for OldQBasicer
0
197
Member Avatar for NatalyC

That error explains it. Your column count does not match your value count. >>insert into users(u_UserID, u_Name, u_lastName, u_Address, u_Tel, u_Notes, u_Email) 1. UserId 2. User Name 3. Last Name 4. Address 5. Telephone 6. Notes 7. Email >>txtUserID.Text + "','" + txtName.Text + "','" + txtLastName.Text + "','" + …

Member Avatar for NatalyC
0
2K
Member Avatar for Diamonddrake

Jerry -- I'm not knocking on your example, it was great, I just wanted to point one thing out: [code] if( OnTimelineRecieved != null ) { TimelineArgs targs = new TimelineArgs(myobject); OnTimelineRecieved(null, targs); } [/code] Technically some believe that is not "thread safe" because in the time between checking if …

Member Avatar for Diamonddrake
0
157
Member Avatar for Ancient Dragon

I agree with seeing *who* upvoted/downvoted a post but if that were implemented then it would be more or less the same as the reputation system. Its just a matter of time before someone does "Find all posts by...." and starts downvoting

Member Avatar for VernonDozier
0
1K
Member Avatar for nccsbim071

Be sure you watch out for spaces in filenames. They are valid and it may break your parser depending on how it is implemented.

Member Avatar for nccsbim071
0
156
Member Avatar for tochukwu
Re: Toch

I don't understand what you are asking .. and since a few days have passed and nobody has attempted to answer your question i'm guessing they are in the same boat. Can you please clarify?

Member Avatar for sknake
0
107
Member Avatar for dima shawahneh

File size? Resolution? By distort I assume you mean scale? If you want to maintain the aspect ratio and not distort you could size it evenly but then you would have to crop images that "dont fit" your model of size. You haven't provided nearly enough information to help you …

Member Avatar for sknake
0
167
Member Avatar for ddanbe

You should invalidate the region of the form being drawn (your panel) and let windows handle the refresh. It is slightly more expensive to cause a redraw of the entire form or forcing a refresh. The operating system does the minimal amount of repainting. It really shouldn't matter for something …

Member Avatar for Diamonddrake
0
291
Member Avatar for subathra

The mouse position is in pixels which is relative to the display settings on the display adapter. You can do the math yourself to convert the values. Can you upload a sample project demonstrating the drawing unit where you want to snap the cursor? You may be better off drawing …

Member Avatar for sknake
0
85
Member Avatar for SAINTJAB

I don't understand what your code is doing. You are making 2 calls to [icode]openFileDiag.ShowDialog()[/icode]. Try something like this: [code] private void button2_Click(object sender, EventArgs e) { using (OpenFileDialog openFD = new OpenFileDialog()) { openFD.Title = "Insert an image "; openFD.InitialDirectory = "c:"; openFD.FileName = ""; openFD.Filter = "JPEG Image|*.jpg|GIF …

Member Avatar for sknake
0
553
Member Avatar for dans@dis.wa.gov

Can you upload a small sample project demonstrating this behavior? Include a data file that is being translated and the libraries required to compile the project. This could be an encoding issue but its hard to say since you're doing transformations on the data.

Member Avatar for sknake
0
202
Member Avatar for benkyma

That looks like code from the twitter API sample I posted some time back ;) Depending if you have changed it or not you do not want to catch the exception in this method. Here is the original code: [code] new Action<Stream>(BeginRead).BeginInvoke( response.GetResponseStream(), new AsyncCallback(EndRead), null); ....... private void BeginRead(Stream …

Member Avatar for benkyma
0
327
Member Avatar for venkates.99

>>"here I need logic/code to get the data direclty to our Application/Server" Getting data directly from the application server depends on how the data is presented. I'm afraid you haven't provided enough information for someone to answer you at this point. Can you explain the project a little more?

Member Avatar for venkates.99
0
113
Member Avatar for Nishara

You need to specify Insert, Update, Delete, and Select queries for your data adapter.

Member Avatar for sknake
0
181
Member Avatar for byehye87

Probably not except by brute force. This is a bad idea though since when the user loses their cookies they will no longer be able to log in. It is just a matter of time before they lose their browser settings.

Member Avatar for sknake
0
124
Member Avatar for SecurExpert

Post the code where you are executing the [ICODE]select * from table[/ICODE]. There are a number of ways to go about this.

Member Avatar for SecurExpert
0
108
Member Avatar for Tank50

[code] Select FriutID from Friut where friutName like (@con + '%') [/code]

Member Avatar for Ramesh S
0
142
Member Avatar for NT.

There is a few samples of various chat systems on code project. Here is one example: [url]http://www.codeproject.com/KB/IP/TCPIPChat.aspx[/url] In the case of p2p just make a single application and either user could be the server or client. Whoever initiates the conversation will be the server and the other is the client. …

Member Avatar for mikiurban
0
2K
Member Avatar for s_mostafa_h

Can you upload a project and sample excel file? I'm having trouble envisioning the task you're describing...

Member Avatar for sknake
0
343
Member Avatar for ankur1188

This sounds like a firewall issue. Your listener could also be set to listen on 127.0.0.1 and not all available IPs. I have very little faith in opening a socket like you have in your example, but i see people do it all the time: [code] IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName()); …

Member Avatar for sknake
-1
1K
Member Avatar for kazit

JPEG is a lossy format. You can pick another image format to save the image. Or do you have something else in mind?

Member Avatar for rajishms
0
197
Member Avatar for ashu2409

Are your tables indexed properly and are the transactions completing and closing? Have you ran the query in the SQL Query analyzer with statistics enabled? Is your web application [b]using parameterized SQL[/b] or are you building the queries dynamically? How many rows are in the underlying table that [icode]udfn_Distance[/icode] checks?

Member Avatar for ashu2409
0
309
Member Avatar for oded_r

Like this: [code] HtmlDocument doc = (Webbrowser.Document as HtmlDocument); HTMLObjectElement FirstElm = (doc.All[0] as HTMLObjectElement); [/code] Or: [code] HtmlDocument doc = (HtmlDocument)Webbrowser.Document; HTMLObjectElement FirstElm = (HTMLObjectElement)doc.All[0]; [/code]

Member Avatar for sknake
0
116
Member Avatar for romanne

What does your SP do? Does it return a cursor (does it have a Select query inside of it?) or are you just trying to get the integral return value of the sproc?

Member Avatar for sknake
0
111
Member Avatar for Nishara

You need to specify a Select, Insert, Delete, and Update query for your data adapter. You also need to call .Update() on your data adapter after you add, edit, or delete a DataRow in your DataSet/DataTable. If you modify a row then re-fill your dataset you're blowing away the changes.

Member Avatar for DanielGreen
0
840
Member Avatar for jeremyvnc

>> "I get errors that another thread is using the textwriter" You can only have a file open once. If two threads open the textwriter to the same file you'll start seeing those errors. What you need to do is funnel all of the File I/O operations through a single …

Member Avatar for sknake
0
76
Member Avatar for therockey123

I see a problem right away with garbage collection in your code. Take this portion of your code: [code] SerialPort sp; private void Form1_Load(object sender, EventArgs e) { string[] sps = SerialPort.GetPortNames(); foreach (string pname in sps) { sp = new SerialPort(pname); } [/code] Now lets expand it to something …

Member Avatar for sknake
0
2K
Member Avatar for sharathk60

sharathk60, I believe the solution Daniel provided will fix your issue. If it doesn't then please post the [icode]CREATE TABLE[/icode] statement for your table.

Member Avatar for sknake
-2
270
Member Avatar for Pullmealong

I found these steps on a site: [QUOTE] 1.From the command line, type sudo su to get root privileges. 2.nano /etc/apache2/mods-available/speling.conf 3.Type CheckSpelling on and hit ctrl-x, y to exit and save the file. 4.type a2enmod and then speling and hit enter. 5.type /etc/init.d/apache2 reload to reload apache. 6.Mistype a …

Member Avatar for sknake
1
189
Member Avatar for HLA91

If you have uninstalled it then [icode]rm -rf[/icode] the directory to erase the data and reclaim the hard drive space.

Member Avatar for jbennet
0
162
Member Avatar for Kristofferson

[QUOTE=Kristofferson;1016307]Well what I did earlier is set my UPDATE statement to [CODE]Update Employee Set Phone = "" [/CODE] Just to see if the the update statment syntax was correct. It worked it effectively erased the entire Phone column. Wouldn't that mean that I can write to the database?[/QUOTE] Yes that …

Member Avatar for TomW
1
190
Member Avatar for Nick Evan

I don't have a flag bad post link either on snippets. I wanted to flag [URL="http://www.daniweb.com/code/snippet231856.html"]this snippet[/URL]

Member Avatar for Dani
0
202
Member Avatar for Umarmai

See this thread regarding sound and beeping: [url]http://www.daniweb.com/forums/thread231020.html[/url] [code] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Console.Beep() Dim sp As New System.Media.SoundPlayer("C:\filename.wav") sp.Play() sp.Dispose() End Sub [/code]

Member Avatar for sknake
0
106
Member Avatar for Shruti Tapadiya

Here is an example of running the code in another thread: [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; using System.Collections; using System.Runtime.Remoting.Messaging; namespace daniweb { public partial class frmQuickSort : Form { public frmQuickSort() { InitializeComponent(); } public static int …

Member Avatar for sknake
0
274
Member Avatar for NT.

Usually you want to close and dispose a socket or listener and create a new instance. In some cases sockets cannot be reused. Can you post the relevant code where you are having these issues?

Member Avatar for sknake
0
103
Member Avatar for pjay

If you have port forwarded both ports and one works fine it sounds like a problem on the webserver. Can you connect to the webserver internally using https? Post your apache config file here as well as the output from `iptables-save `(run that command as root). Please use code tags …

Member Avatar for sknake
0
299
Member Avatar for drspock

Do you have to register the font? I have seen code snippets before that use unregistered fonts. [code=c#] // Be sure to dispose your PrivateFontCollection // and Font to avoid an easy leak! System.Drawing.Text.PrivateFontCollection privateFonts = new PrivateFontCollection(); privateFonts.AddFontFile("mycustomfont.ttf"); System.Drawing.Font font = new Font(privateFonts.Families[0], 12); this.label1.Font = font; [/code] [I]Borrowed …

Member Avatar for sknake
0
600
Member Avatar for mikhail96
Member Avatar for beginerC#

Main form: [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.editform { public partial class frmMain : Form { private DataTable _dt; public frmMain() { InitializeComponent(); } private static DataTable GetData() { DataTable result = new DataTable(); //nr,date and obs …

Member Avatar for beginerC#
0
147
Member Avatar for scvinod

[code] private void button1_Click(object sender, EventArgs e) { string domainAndUser = @"system\admin"; string[] sArray = domainAndUser.Split(new char[] { '\' }, StringSplitOptions.None); string domain = sArray[0]; string user = sArray[1]; Console.WriteLine("Domain: " + domain); Console.WriteLine("User: " + user); } [/code] Results in: [code] Domain: system User: admin [/code]

Member Avatar for Rashakil Fol
0
264
Member Avatar for mldardy

You can use [URL="http://msdn.microsoft.com/en-us/library/ms151198.aspx"]sql replication[/URL] to replicate the database from one server to another.

Member Avatar for sknake
0
77
Member Avatar for stoymigo

It sounds like you're on the right track. You know what you need to do so I don't understand what you're asking. If you have a specific question about creating a dataset or its' behavior then please update the thread with your question.

Member Avatar for stoymigo
0
186
Member Avatar for sivananda2009

DdoubleD is right. To elaborate more on the issue take this for example: [code] string s; s += "abc"; [/code] Now you're appending a value to s, but what is s? It was never assigned a value thus you have the problem. What you can do: [code] string s = …

Member Avatar for sknake
0
116
Member Avatar for jaimca

[code] Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim p As New System.Diagnostics.Process() p.StartInfo.FileName = "C:\\test.bat" p.Start() End Sub [/code] You can also call [icode]p.WaitForExit()[/icode] if you want your application to hold up until the bat file is done running.

Member Avatar for jaimca
0
2K
Member Avatar for Mongz
Member Avatar for glasnoster

The End.