
MTSkull
Avatar/Signature-
Posts
153 -
Joined
-
Last visited
Everything posted by MTSkull
-
Is there any way you can check the server to see if someone has the document open on anouther computer. That is the error I get when that condition exsists. MTS
-
As a follow up I spent the whole day fixing a host of minor to major bugs that I missed somehow. Nothing like users to find the flaws in code. :) MTS
-
I just wanted to thank this forum for all its help. In July I started to work on an upgrade that would move some of my companies programs from Visual Fox Pro to SQL Server. The first reason; in this area a good inexpensive Fox Pro programmer is very rare, but there are tons of SQL server people out there. The second reason; the parent company wants us to move to .net and SQL server because that is what they use. So in July I spent a solid month working on a .net shell that I could then customize to fit the needs of the project. The project I was originally designing for got scrapped and the .net shell went on the back burner. The first week of December we got in a new project that we would be taking over from another vendor. They were required to turn over there data to us so we could continue the project. They submitted it to us an SQL server backup file. The specs for the project were way outside anything we had in Fox Pro so I got the nod to connect the .net shell to the SQL data from the other vendor. Today I had a second meeting with the data entry people for training. The fixes that I took out of this meeting where minor. So I fixed them, compiled and saved it to a folder on the network. Then I had the IT guy go to all the computers that required the program and Load .net architecture and SQL server Client. I just got back from dropping the first folder into the first computer. The program came right up connected to the server and I could see all the data. I still have a huge list of must fixes and nice to haves, but is real nice to roll out V1 software, and have overall good comments from the people who will be using it. So this post is for everyone who helped me out here, I could not have done it without this Forum. Thanks Everyone. :D :D :D MTS
-
Folder if I am working in windows, Directory if I am in Dos or Command Line.
-
Thanks Bucky (any relation to Bucky Katt?) This program uses a vb.net Template I wrote in July. Since then I have learned a lot of new stuff about vb.net that i would like to go back and fix in the template. Due to time constraints that won't be possible, so this program has a lot of legacy calls as well as newer .net stuff. I really like the data object model. I love Datasets and stuff. The connection to SQL server is very nice. What I have used so far.
-
Thanks, I searched this forum for how to do conversions because I still use cint, cstr, etc. I ran across conversions in anouther post and did not know about parse, cType, or the convert class. When should one use these differnet methods? Or just point me to an artical so I can read about it. The .net help hints at why but does not compare them directly. Thanks MTS
-
I am parsing a string and then converting it to a Date Time. Here is the code I use, is this the best way or is there a better way. dim tempStr as string dim tempArr() as string Dim fileDateTime As Date 'fill tempArr with data from a text file 'Build the Date of the File tempStr = tempArr(3).Substring(0, 2) & "/" tempStr &= tempArr(3).Substring(2, 2) & "/" tempStr &= tempArr(3).Substring(4, 4) 'Build the time of the file tempStr &= " " & tempArr(4).Substring(0, 2) & ":" tempStr &= tempArr(4).Substring(2, 2) & ":" tempStr &= tempArr(4).Substring(4, 2) fileDateTime = fileDateTime.Parse(tempStr) What I am unsure of is the last line. Using the parse method to fill fileDateTime variable with the constructed date string. Thanks MTS
-
Wow, thats much easier then my way. Thanks MTS
-
I see what you mean I get the row and column info as text as well. Are you using the Datagrid tied to a Dataset? If so then this is how I extract the data from the selected row in one of my current programms. I use the selected row of the grid to refrence the corresponding row in the dataset. In this case I am pulling the Record Key by column name as an integer. Dim iCurrentRow As Int32 Dim drCurrentProf as DataRow 'Note dtData is global datatable declared and filled elsewhere '1. Get the current Row number from the datagrid iCurrentRow = grdResult.CurrentRowIndex() '2. Get the current row from the table as a row object drCurrentProf = dtData.Rows(iCurrentRow) '3. Pull the record ID from the selected row, as an Integer. giSelectedDoctorID = CInt(drCurrentProf("PHYSID")) This is a little involved but I have not found a way to do this otherwise. Sorry for the earlier misinformation. MTS
-
Try int x x = dgMyGrid.CurrentRowIndex dgMyGrid.CurrentCell = New DataGridCell(x, 1) stringX = dgMyGrid.CurrentCell.ToString() once again my this is vb but C# should be close
-
Wait you want column1 of the row. Little tougher sorry.
-
Try stringX = dgMyGrid.CurrentCell.ToString() This is in VB but C# should be close to the same if not Identical.
-
Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet Dim myString as string 'initialize the xlapplication xlApp = CType(CreateObject("Excel.Application"), Excel.Application) xlBook = xlApp.Workbooks.Open(strPath & strFileName) xlSheet = xlBook.Worksheets(1) myString = xlSheet.Cells(1, 1) '(Row, Column) xlSheet = nothing xlBook.Close() xlBook = nothing xlApp.Quit() xlApp = Nothing This should get you started. You want to make very sure that the Xl objects get closed down completly or bad things will happen. A lot times if you stop execution with out closing the object down you will have to go into the Task Manager -> Processes, sort by process name to see if EXCEL.exe is running then end the process. I had 20 open at one time and the computer was doing all kinds of funky stuff till I shut down all the instances of the app, which will not show under applications on the task manager. In order to get an Idea of the commands, record macros then look at the VBA code (in Excel) to reverse engineer the Excel Object Model. The commands will not be exactly the same for .net but close enough that you can experiment and figure it out. MTS
-
I marked the poll as 25-30, when I started to program Access with VBA, moving away from point and click. When I was in the navy (20 years old) I was trained to program the UCQ 20. It was a box 2 foot by 2 foot box with a 64K Hard drive (this included the ram and was half of the total size of the computer and weighted about 100pounds). The system was a dual processor (2 UCQ20's) and all the peripherals filled an entire room. The peripheral data connectors that interconnected everything where 150pin monsters. The UCQ 20 had to be programmed in machine language. So I had to know the Jump command, push data to p register, and all that. It was eight bit (octal) and the program was entered directly into the Memory address via a light panel. So if I wanted to jump I would have to enter the hard drive mem address, then the code for a jump command, then the next hard drive mem location would be the data ie: Part1, 10010101, Part2, 00101010. If I wanted to save programs I would have to print it out to a Paper Tape Reader, which was a thin strip of paper with Holes in it read by a light sensor. If you wanted the tape to last you would get it right in memory then punch it out as a Master using Mylar Tape. It gives me headache now thinking about all that, but, as a result I can think in Hex and Octal pretty much subconsciously. MTS
-
Is it worth it to get MSCE for .net or SQL server? MTS
-
I kept playing with it and got this to work. sqlConnection = New SqlClient.SqlConnection(strConn) sqlConnection.Open() sqlCommand = New SqlClient.SqlCommand(strSQL, sqlConnection) iReturn = sqlCommand.ExecuteNonQuery() sqlCommand.Dispose() sqlConnection.Close() sqlConnection.Dispose()
-
I am missing something but can not seem to find an Awnser. strConn = "data source=" & gstrServer & ";" strConn &= "initial catalog=" & gstrDB & ";" strConn &= "Integrated Security=SSPI" strSQL = "EXEC Update_Phys_Address " strSQL &= "'" & giSelectedLocation & "'" strSQL &= "'" & giSelectedDoctor & "'" strSQL &= "'" & txtAddress1.Text.ToString & "'" strSQL &= "'" & txtAddress2.Text.ToString & "'" strSQL &= "'" & txtAddress3.Text.ToString & "'" strSQL &= "'" & txtCity.Text.ToString & "'" strSQL &= "'" & cmbState.Text.ToString & "'" strSQL &= "'" & txtZip.Text.ToString & "'" strSQL &= "'" & txtPhoneNumber.Text.ToString & "'" strSQL &= "'" & txtFaxNumber.Text.ToString & "'" subSetMsgCaption("Updateing Physician Address Table") subSetMsgTitle("Datafeed in Progress") subShowMessageBox() sqlAdapter = New SqlClient.SqlDataAdapter(strSQL, strConn) ????? I am trying to update the Physicians address via stored procedure. I can not seem to find the Execute Command (vb6) is it replaced with the Fill command. By the way I got the Idea to run the Update via stored procedure from another post. I hit my head and thought "Why didn't I think of that." MTS
-
Thanks, I tried both methods Just for fun and they worked like a charm. I was looking at some old code and I had used the if odject is nothing then to fix it before so that is what I stuck with. Thanks From a very stressed out under an impossible deadline programmer! MTS
-
How do I resume Execution after I fix the error? The failure I want to fix occures at gdsData.Tables("MyTable").NewRow(). The path the user took to get here resulted in no data loaded into the Dataset, so I want to load the dummy record into the dataset to allow the add to continue. Try gdsData.Tables("MyTable").NewRow() gdsData.BeginEdit() .... Catch oException As Exception If oException.Message = "Object reference not set to an instance of an object." then giCurrentDocID = 1 funLoadDocData() Resume? Else 'something else happened so bail out End if End Try After I load the Doc Data I want to resume where I left off in this instance. Also is this the best way to handle the error or could there be a cleaner way to do this? Thanks MTS
-
Since I do not get the option to use front page extensions. Do I need to install that before it will work? Brian
-
How do I disable the Network warning in .net? I have a programming Drive on our network, where I placed the 101 VB.net samples from MS. When I try to access the projects directly from the network I get a "This program acannot be trusted". I cannot use the program until I download the program to my local hard drive. I would like to find a way to disable this warning. Thanks Brian
-
I wrote a simple screen saver app that cycles through all the pictures in a folder. I have 1 question and 2 bugs that I need help with. Public bFirstMove As Boolean Public Pics() As String Public position As Int16 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) ; Handles MyBase.Load Me.CenterToScreen() picBox.Height = Me.Height picBox.Width = Me.Width bFirstMove = True Pics = Directory.GetFiles("C:\Fractals") position = 0 picBox.Image = Drawing.Bitmap.FromFile(Pics(position)) End Sub Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) ; Handles MyBase.KeyUp Me.Close() End Sub Private Sub picBox_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) ; Handles picBox.MouseMove If Not bFirstMove Then Me.Close() Else bFirstMove = False End If End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) ; Handles Timer1.Tick position += 1 If position = UBound(Pics) Then position = 0 picBox.Image = Drawing.Bitmap.FromFile(Pics(position)) End Sub 1. How do I pass the capture of the mouse move to the underlying form? Since the pic box is sized to = the form I have to put the mouse move event in the picBox control. This probably does not matter but I am curious how it is done. 2. If I hit run (F5) from inside the .net developer, it always picks up a mouse move event and shuts down the program. That is the reason for the bFirstMove form global. Is there a way to flush the mouse move buffer? 3. I compiled this and tested it out and it works as a screen saver (changed .exe to .scr). After about a 1/2 hour of continuous running I get a "System out of Memory" fault that crashes the program. Do I need to set the picBox.image to nothing to flush memory or something? Thanks Brian
-
I can but I was wondering what the command was. Thanks Brian
-
How Do I... 1. Maximize a form on form load... me.maxamize? 2. Expose the display properties. 1024 X 768?? Thanks Brian
-
New to Dot Net... How do I use the command window? >?testFunc() Public Function testFunc() As String testFunc = "Test" End Function Thanks