can anybody help me with a vb code that will browse into the folder and then delete/empty all its contents say, to another folder.:confused:
phokojoe
can anybody help me with a vb code that will browse into the folder and then delete/empty all its contents say, to another folder.:confused:
phokojoe
i am a new C++ programmer and would like to implement an array based list for 100 integers and would also want to sort them by any integer of my choice. snyboy with an with an idea on how to go about this? :(( :((
phokojoe
i have this code guys: j = -3; for (i=0;i<3;i++) { switch (j+2) { case 3: case 2: j--; break; case 0: j += 2; break; default: j=0; } if (j>0) break; j = 3-i; } i want to write this without the breaks and goto how can i do it gurus? :sigh:
phokojoe
yah yah yah, without you i could have not survived this stress. i have done it! it works. thanks once more.
phokojoe
i have just tested it, but the problem is, i have so many entries in that column. when i write a column name, it does not replace the commas, instead it returns the column name not even the entries in that column. eg. like i said, the values in that column are of this shape: 01,02,M,045,1948,2,21 and the column name (field) is say column1 i will write: select replace('column1',',','') it only returns column1 not 0102M0451948221. please help me on this. :rolleyes:
phokojoe
thanks Blue_Boy, i am going to try it, but by the look of the syntax, it will work. thanks once more :-D
phokojoe
i have a string data in a column in an msqsql database table and the values are separated by commas (,)eg 01,02,M,1,045,12,1948 i want to remove the commas in that column so that the data looks like 0102M1045148. can any one help me . thanks members :sigh:
phokojoe
i want to write a win32 console in c++ and would like to connect to mysql database. can anyone show or guide me with the code for connecting to the server.:mad:
phokojoe
I want to install QT4 for C++, I do not know if this is a good forum to ask this question. How can I get a copy of QT4. Can anybody tell me how to get its copy and how to install :)
phokojoe
I was using Visual studio 2003 to develop windows applications in c#. Now I have moved to Visual studio 2005. I wanted to use Datagrid in my application but the only thing I see is what is called datagridview. Are these two the same, if yea can I use the same code to populate a datagridview?:rolleyes:
phokojoe
I have been searching the net for a simple database application using visual c++. I want somebody to help me with how to develop just a small application for entering records, deleting, updating and searching using visual c++ and ms sql server 2005. Even if it can be for one record, I can extend that to whatever the number of columns I have in my database. I have been developing some but all in vain. Nothing seems to work. Please!:((
phokojoe
I do not understand. I know how to attach the database. My question is, when you install ms sql server, the default directory is c:\ whatver the name of the hard drive it is. And the .mdf file is located at c:\program files\microsoft sql\mssql\data\databasename.mdf. Now I want this database to be in the other drive not the default drive. Is it possible?
phokojoe
Hi! I have installed MS SQL Server 2005 on my Company's server (c drive) and I want to create my databases so that the Data is on another hard drive (N:\) is is possible to do that. Thank you:~
phokojoe
I do not quite understand how to add the microsoft.office.interop.excel. Guys the examples I have found when searching through google were those for asp.net or vb.net. I am only interested in the C#.net part of it. Can anybody show me how to make the first step, the rest i can follow. Please
phokojoe
I have a data stored in MS SQL server database table. Since my users do not have direct access to the database tables, I am developing a system for them to query the tables and the data will be displayed in the datagrid and they can click a button and data exported to Ms excel. I am able to display data in the datagrid based on the query I have written but getting data from data grid to excel is a problem .:((I have tried everything but no solution. I am able to open a notepad but with ms excel, I can not. Can anybody help me.
phokojoe
Yep! Thank you for responding. You are great. Actually I have already found where the problem was. I passed the array refence not the actual column name. I changed the dr[0] to dr["columnname"] and it poped up every row that meets the if statement conditon. And in the System.Convert.ToInt32 i changed that to ToInt16 and the condition wokrs fine. However I will aging write if I have a problem because I have to test for many columns against others. Once agin Thank you.
phokojoe
Yep! Thanks a lot. It worked but to a certain level. I maneged to retrive just 1 record/column before I intoroduce the if statement. I have about 127 records at present, but when I introcude the if statement to compare the values and then display them in the richtextbox, I get the message on the if statement "An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll Additional information: Input string was not in a correct format." this is the code try { string str = "select * FROM table1"; con = new SqlConnection(_connect); cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandType = CommandType.Text; cmd.CommandText = str; // Open the Connection con.Open(); dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); while (dr.Read()) { if (System.Convert.ToInt32(dr[10]) < 20) { rtb.Text = dr[7].ToString(); } } } catch(SqlException ex) { MessageBox.Show(ex.Message); } finally { // Close the Connection object con.Close(); } I am comparing column 10 with the age of the person that is 20 and then display the id of that particular record in textbox which is in column 7. Can you please point where I am doing the wrong thing Cheers!:~
phokojoe
I have a windows application of which I want to validate a survey data that was captured using another software and stored in an MS SQL server 2000 database table. eg. I have three columns , Sex, Age, Marital status if a person is less than 20 years and is reported to be married, I have to fire the message that is the person is too young to be married. I was able to do that in VB 6.0: This is the code snippet that was used in vb 6.0, I had a richtextbox object where I placed all the error messages. ------------------- Dim adoTest As New ADODB.Connection Dim rstTest As New ADODB.Recordset Dim adoSearch As ADODB.Recordset Dim census, i As Integer Private Sub cmdTest_Click() cd.ShowSave rtb.SaveFile cd.FileName End Sub Private Sub Form_Load() adoTest.CursorLocation = adUseClient adoTest.Provider = "MSDASQL.1" adoTest.ConnectionString = "Password=sa;Persist Security Info=True;User ID=sa;Data Source=LSA2006;Initial Catalog=LSA2006" adoTest.Open If adoTest.State = adStateOpen Then MsgBox "Connexion with the server established", vbInformation, "Testing" Else MsgBox "Connexion Failed !", vbInformation, "Testing" End If rstTest.Open "select * from table2", adoTest, adOpenDynamic, adLockOptimistic rtb.Text = "" While Not rstTest.EOF If rstTest!married = 1 And rstTest!age <= 15 Then If rtb.Text = "" Then rtb.Text = rstTest!id Else rtb.Text = rtb.Text & vbNewLine & rstTest!id & " Too young to get married" End If End If If rstTest!age <= 20 And rstTest!education >= 3 Then If rtb.Text = "" Then rtb.Text = rstTest!id Else rtb.Text = rtb.Text & vbNewLine & rstTest!id & " Age not consistent with education" End If End If rstTest.MoveNext Wend End Sub ------------- Can anybody help me how to do this in C#. I have to do data validation quickly:confused: Thank you
phokojoe
Thanks a lot. I have used system restore and everything is fine. Actually there is young man in my office once I leave my PC, he comes and start copying files from my pc so I did hide the desktop as to prevent him doing so.:)
phokojoe
I had some folders which contains important files on the desktop. I went to windows explorer and hide the desktop and now I can not locate where the files are. Please help me to restore the files.:((
phokojoe