Jump to content
Xtreme .Net Talk

techmanbd

Avatar/Signature
  • Posts

    405
  • Joined

  • Last visited

Everything posted by techmanbd

  1. try this command Select * from TableName Where Timestamp > '01-DEC-2003: 10:00:00' basically the format for date and time in oracle is DD-MON-YYYY: HH: MI: SS and the HH is 24 hour clock if you are just lookig at dates then it is 'DD-MON-YYYY' and if you don't specify a time then oracle assumes the time is 12:00:00 AM
  2. Glad I can help. I totally understand. I just finished a 1 1/2 day hair puller. Luckily i figured it out or my computer was going to go through the window, haha and the date dim strdate as string strdate = DATE.now.tostring take it easy, brian
  3. ALSO just realized, a text field cannot be a Primary Key. That is where you problem was.
  4. OK found your problem Delete you EmpHours table, build another one and when it says recommend a primary key, SAY NO, one problem is that when you make a primary key, you can't have a duplicate statement in that row, and it looks like you will have duplicates in that table. It is working now on my machine
  5. ok, sounds like something in your table is not corresponding correctly. check that you column IS text in the table design, and if so check you field size, make sure that the number is higher than what your text is. 'chris' = 5, but not knowing wha the field size will be all the time, because names vary make it 50 because eveything looks write, and without seeing your table that is all that I can think of
  6. YES WOOHOO FINALLY GOT IT here is the code so anyone you has the same problem can see it Dim myProcess As Process = New Process Dim s As String myProcess.StartInfo.FileName = "cmd.exe" myProcess.StartInfo.UseShellExecute = False myProcess.StartInfo.CreateNoWindow = False myProcess.StartInfo.RedirectStandardInput = True myProcess.StartInfo.RedirectStandardError = True myProcess.StartInfo.RedirectStandardOutput = True myProcess.Start() Dim sErr As StreamReader = myProcess.StandardError Dim sOut As StreamReader = myProcess.StandardOutput Dim sIn As StreamWriter = myProcess.StandardInput sIn.AutoFlush = True sIn.Write("procmd /1 /p16f84" & System.Environment.NewLine) Dim bool As Boolean = False Dim intnext As Integer = 1 Do While Not myProcess.HasExited If Not myProcess.HasExited Then sIn.Write("exit" & System.Environment.NewLine) End If Loop myProcess.WaitForExit() Do While sOut.Peek >= 0 s = sOut.ReadLine bool = boolPromate(s) If bool Then strPromate = s Exit Do End If Loop sIn.Close() sOut.Close() sErr.Close() myProcess.Close()
  7. INSERT Into EmpHours.EmpID, EmpHours.StartTime, EmpHours.EndTime VALUES ('chris','adam','alex'); you need to put () around columns and put the table name outside like this like this and try INSERT Into EmpHours (EmpID, StartTime, EndTime) VALUES ('chris','adam','alex');
  8. yeah, but what I was saying is goto your ACCESS database and try running the SQL statement in ACCESS itself, not through VB and see if you get an error there
  9. did you try going straight to the database and write a query to with that insert statement and just take out the text.boxes and add some data and see if it works in the database?
  10. Dim MyCommand2 As New OleDbCommand("INSERT Into Employees VALUES ('" & TextBox15.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "','" & TextBox10.Text & "','" & TextBox11.Text & "','" & TextBox12.Text & "','" & TextBox13.Text & "','" & TextBox14.Text & "','" & ComboBox1.Text & "')", MyConnection) MyCommand2.ExecuteNonQuery() you dimmes addcust as a reader. you are not trying to read.
  11. Engine Thanks, I did get it to work partly, here is what I have: Dim myProcess As Process = New Process Dim s As String myProcess.StartInfo.FileName = "cmd.exe" 'myProcess.StartInfo.Arguments = "/1 /p16f8" myProcess.StartInfo.UseShellExecute = False myProcess.StartInfo.CreateNoWindow = False myProcess.StartInfo.RedirectStandardInput = True myProcess.StartInfo.RedirectStandardError = True myProcess.StartInfo.RedirectStandardOutput = True myProcess.Start() Dim sOut As StreamReader = myProcess.StandardOutput Dim sErr As StreamReader = myProcess.StandardError Dim sIn As StreamWriter = myProcess.StandardInput sIn.AutoFlush = True sIn.Write("procmd /1 /p16f84" & System.Environment.NewLine) Dim bool As Boolean = False sIn.Write("exit" & System.Environment.NewLine) myProcess.WaitForExit() Do While sOut.Peek >= 0 s = sOut.ReadLine bool = boolPromate(s) If bool Then strPromate = s Exit Do End If Loop If Not myProcess.HasExited Then myProcess.Kill() End If sIn.Close() sOut.Close() sErr.Close() myProcess.Close() Now I get my line that I am looking for. But because the procmd program takes time to run, and I do the "Exit" to exit the whole cmd.exe process, it never catched the exit so the process never terminates. And instead of pulling up the cmd.exe i put in the procmd.exe and then ran the attribute part for "/1 /p16f54" there isn't an output. I am lmost bald pulling my hair out trying to figure away to "exit". So is there a way to monitor the procmd program while running in cmd.exe so once it finishes I can throw the "Exit" command. If I get that then the whole thing will work like I want. Thanks
  12. Sorry, I guess I didn't write that clearly. Basically the program is run like in the DOS environment, now days COMMAND PROMPT window. "PRO MATE not found" is one of many messages that after the program is run displays. I want to be able to capture what ever message comes from that program that i run through the process
  13. Ok I have this program that has to be run in the command window but need to use in .net so far I have this [ Dim ps As New ProcessStartInfo(Application.StartupPath & "/procmd.exe", "/1 /p16c54a") ps.RedirectStandardError = True ps.UseShellExecute = False Dim process As Process = process.Start(ps)] now when run in the command window, after the process is done it reads, and since i don't have the device connected I get this line PRO MATE not found How can I capture the message in .net so I can process the info that the device wasn't found?
  14. dim dblAnswer as double dblAnswer = convert.todouble(lstboxstart.items.indexof(INTEGER)) + _ convert.todouble(lstboxFinish.items.indexof(INTEGER)) if you need the dblanswer to show up in a text box then just do this textbox1.text = dblanswer.tostring
  15. I have a table called tblTestData and have a column called TestID and when I eneter the test data I want the TestID to auto increment
  16. found my own problem, intead of using INNER JOIN, I just use Select .... from ....... where
  17. I am trying to figure out how to auto increment a column that i basically make an ID that is an integer when a new record is inserted In Oracle I know you "Create Sequence ....". I tried that in the AS400 but I guess that is only a Oracle command and not standard SQL. Is there something like this on the as400 table?
  18. Ok Here is my SQL Statement SELECT TblPFtestData.TestID, TblPFtestData.AssyRev, TblPFtestData.SalesRev, (Select tblPassFail.PassFail FROM tblPassFail INNER JOIN tblPFtestdata ON tblPassFail.PFID = tblPFtestdata.PFcurrentL) AS CurrentL, (Select tblPassFail.PassFail FROM tblPassFail INNER JOIN tblPFtestdata ON tblPassFail.PFID = tblPFtestdata.PFcurrentNL) AS CurrentNL FROM TblPFtestData Ok when I run it, it works fine if only 1 record is in tblPFtestdata if I add another record I get this error "At most only one record can be returned by this subquery" I don't see why it would say this Here is what I am doing. I have one table tblPASSFAIL. with a column PFID of 1 or 2 and also has column PASSFAIL with "PASS" or "FAIL" corresponding I have another table which has about 7 columns which will show a 1 or 2 and I want to make a query that puts where the 1 or 2, Make it "PASS" or "FAIL" thanks for any help
  19. Don't use .showdialog. that just puts the forms in front of the parent form. this is what you need to do dim frmSplash as new frmSplash dim frmAuto as new frmAuto frmSplash.show frmAuto.show Me.Close()
  20. The autonumber shouldn't effect it because I do the same And I don't have a problem
  21. in your database, is the field customerstatus a character field? if so you need to put parenthesis around the value being entered like so ("INSERT INTO CustomerStatus (CustomerStatus) VALUES ('" & txtAdd.Text & "')"
  22. I also had a problem like that, and I had my path correct in my program. The wired thing is I went and opened the MS Access Database, then closed it, and then it would. Don't know why it worked after that but it did.
  23. Found my answer, here is a link for who ever has the same problem. http://beta.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20697219.html Talks about automation which is another term for late binding. I used this and it worked great
  24. I think I may have found my problem, On my computer I have the excel library 10.0 and on the other computer the excel version is 9.0 So how can I get this to work? without having to downgrade my ms office or upgrading to office xp on the other computer? license reason why.
  25. how about the lock property
×
×
  • Create New...