Hi, I am implementing a JavaScript Calender in my Page. It works well in Internet Explorer but not in Mozila. My Javascript calender in in content page. It contains a .css file and a .js file to render the control. I am using an img to call the calender and set the value of the textbox to the selected date on calendar. help. thanx in advance Ranjeet
DownBySpj
Posts
-
JavaScript problem in Mozila -
using javascript popup in asp.net to print some server side contenthi, i want to open a popup window from an aspx form which should contain the content from the server . is there any way to pass the content to the popup window. also i have to print the content of the popup and return a variable indicating that the doucmnet is printed. is it possible. i m new to javascript in asp.net. please help
-
How to know whether a file is copied or notI am working on creating a windows service. Here I have to watch a folder for any file that is placed in that folder. If a file is placed in that folder i have to process it. I am doing this with the filesystemwatcher component's created method. This works fine when i am placing files one by one. But when i place 5 or 6 files at the same time, or when i place a file of bigger size, say above 3 MB, it produces error, saying that the an system.ioexception has occurred. The file is being used by another application. I think this is due to the fact that the windows takes some time to copy that file to that folder, whereas filesystemwatcher components starts it's execution as soon as it finds a file in that folder. Any suggestion will be very welcome
-
inserting wrong number of recordshi, In the inserting module i am incrementing a counter if there is a sucessfull insert. This lets me know about the number of records that are processed by the code. And in the database table, i use just " select * " statement to know exactly how many records are inserted. Before the insertion table is empty. So the number of records returned is the number of records inserted by the code. But there is a problem somewhere, that's why it is showing me wrong no. I am first reading the whole file in a string array. This way it becomes cler about, how many records are there, and then i inserts the records one by one. But it is happening so. If an exception regarding primary key, or foreign key or any other, i am incrementing a counter for errors. But the probelm is it is not showing any error. Any help :doh:
-
inserting wrong number of recordsHi, My job is to read a text file and insert all the records from that text file to a database table. I have partly done that. There is an identity field in the table named
record_id
. I am buliding the sql insert insertment taking values from text file and inserting records. Everything is fine as long as the number of records are less, say, 50 or 100 or 150. If the number of records goes above that all the records are not inserted. As against 766 records only 606 records are inserted. Also the autoincrement field should increment uniformly. But it is not happening so. What is the problem ? Is there a sql server problem or some logic problem. Any suggestion is welcome :confused: -
using stringbuilderHi, I want to know about the stringbuilder and its use. Can it be used to read a text file line by line for further processing. Right now i m using array to read the whole contents of a text file and then processing it line by line using the array index. Is it possible by using stringbuilder. It is required to process each line in the text file seperately. Thanx in advnace
-
Creating Windows serviceI want to create a window service which should be just like a FileSystemWatcher. I want to watch a particular folder. If a file is put in that folder i want to call a method. Any suggestion is welcome. thanx in advance
-
catching sql exception typeI have a problem. Whenever we pass an insert statement against database table the exception can be cathced by using sqlexception parameter. I have done with exception where there is a problem with the primary key because i know the error code it genereates when there is a primary key error. But how can i do the same type of checking when there is an error related to foreign key. Wht is the error code for foreign key related errors. Something like below
try { insert into database; if (success) then do nothing; else check about the cause of exception } catch { if (primary key exception) dosomething; else if(foreign key exception) dosomething; else dosomething; }
any help will be wellcomed. Any suggestion is well received. thanx in advance -
trapping sqlexceptionI have the following problem. Whenever we pass an insert statement against database table, if anything goes wrong the exception can be cathced by using sqlexception parameter. I have done with exception where there is a problem with the primary key because i know the error code it genereates when there is a primary key error. But how can i do the same type of checking when there is an error related to foreign key. Wht is the error code for foreign key related errors. Is there any other approach for doing this kind of things Any suggestion is well received. thanx in advance
-
uninstalling windows servicesI have made a windows service and deployed it using installutil utility. Now i want to remove it as i have to make some changes in the original service. How can i remove the service. I have another problem. Whenever we pass an insert statement against database table the exception can be cathced by using sqlexception parameter. I have done with exception where there is a problem with the primary key because i know the error code it genereates when there is a primary key error. But how can i do the same type of checking when there is an error related to foreign key. Wht is the error code for foreign key related errors. Any suggestion is well received. thanx in advance
-
Files in folderYou can use DirectoryInfo and FileInfo Class and then use getfiles method of directory ojbect to get all the files inside a particular directory. You can also use to to get a particular kind of file
DirectoryInfo dir = new DirectoryInfo(@"d:\skypak\text"); FileInfo[] bmpfiles = dir.GetFiles("*.txt");
-
getting error codeI have to change some of my logic based on the error returned by a code. I have to first try to do a simple insert in a table. If it throws a error then i will have to change the statement(update) and again try the insert. How can i do this. Sorry if i hv posted the question in the wrong discussion board. It may be a quesiton of c# also
-
zip and unzip in .net 2.0hi, i have to implement zip and unzip files in my application. The requirement is i have to take zippd file from mail attachment, unzip it to a particular location and use it. On the other hand i have to zip a files from a particular location and send it to someone as mail attachment. Any help is appreciated. Thanx in advance
-
creating insert statement using arraysi want to create a insert statement for inserting data in a table. Here the column names are stored in one array and the values are stored in another array. Any idea will be of great help for me. thanx in advance all ur help
-
problem in querying databasethanx for all. it did not solved my problem. But u just directed me to think in the right direction. I just deleted all the spaces between after the recordcode and my problem was solved
-
problem in querying databasehi, i m having problem in reading values from database. something silly i m doing but can't figure it right now. Any help is welcome
public void getColumnNames(string col) { string constr = System.Configuration.ConfigurationManager.AppSettings["conskypak"]; String cmdstr = "SELECT columnname FROM TableDescription where RecordCode=' " + col + " ' "; SqlConnection cn = new SqlConnection(constr); SqlCommand cmd = new SqlCommand(cmdstr,cn); SqlDataReader dr; cn.Open(); dr = cmd.ExecuteReader(); while (!dr.Read()) { string name = ""; name =(string)dr[0]; } cn.Close(); }
-
returning arrays from functioni have to return a string array from a function. I hv to retrieve the name to employees from emp table having certain code and return it to the calling function to be used for other purpose. thanx in advance
-
Reading Text file line by linethanx for the tip.
-
Reading Text file line by lineI want to process a text file line by line. how can i loop through all the line in a text file one by one
-
reading text file seperated by PipesNoops yaar. i m stuck with this becuse i m stuck in this and is unable to think the way i should proceed. if u can help. i have to implement this and it is very urgent..