|
I can't see any handling in the code. (The only handling I've found is one for any changes (adds to undo stact), and some value updaters depending on what you put into a specific field.)
Function wise, the cells handle like something from Access.
The version of VB is whichever version comes with Visual Studio 2005
- Munty
|
|
|
|
|
From the looks of it, VB.NET.
- Munty
|
|
|
|
|
Make sure there are no toolbar buttons that have a shortcut key of "Del" or "Delete" that are eating the keystroke but not doing the right action with it.
Watch for a telltale flicker when you hit the delete key.
|
|
|
|
|
Before I start: Thanks for the comment. I think it's shown me where the problem is. I just don't know how to fix it :P
Trying out the del key in the program produces no flicker, however I looked at the menus in the source code and it looks like the Delete option in the Edit menu uses the Del shortcut.
However, when that shortcut is removed, the delete key no longer works on the nodes in the TreeView. From the looks of it, when that menu is used, if the Treeview is the active frame, it removes whatever node is selected.
I assume to fix the problem, I just change it so that it has an else statement that makes the delete key act like normal. I just don't know how to do that.
- Munty
|
|
|
|
|
Well never mind. Now that I know the problem area was the menu, I was able to get a fix.
The fix wasn't adding an else to the delete statement. It was adding a handler to the FixtureTree that listened for the delete key, then called the appropriate handlers when del was pressed.
- Munty
|
|
|
|
|
Excellent. Glad I could help.
Dave
|
|
|
|
|
Hai VB'ers...
I have problems in using/implementation NERO SDK with VB codes.
My problem is:
1. How to calculate disk space in CD?
2. How to make multisession burn process?
Thxs b4...
Regrads,
Harry
|
|
|
|
|
These are questions about the library you're using, not VB. Your best source of information is going to be a Nero support board.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all
I am creating a crystal report and the Problem is that when i debug the same program i get my Result But when i didnot debug and execute directly i am not getting required result.
!!kindly Help me. Where is the Problem
I have written my code.
Dim SqlStr As String
SqlStr = " Select * from tmp"
Set Rs1 = Db.OpenRecordset(SqlStr, dbOpenDynaset)
If Rs1.RecordCount <> 0 Then
Do While Rs1.EOF <> True
Rs1.Delete
Rs1.MoveNext
Loop
End If
Set Rs1 = Nothing
SqlStr = "SELECT SalesMaster.`INvcNo`, SalesTrans.`Item`, SalesTrans.`Company`, SalesTrans.`Design`, SalesTrans.`Shade`, SalesTrans.`Qty`, SalesTrans.`MRP`, SalesTrans.`DicsAmt`, SalesTrans.`Amount`" & _
" From `SalesMaster` SalesMaster INNER JOIN `SalesTrans` SalesTrans ON " & _
" SalesMaster.`INvcNo` = SalesTrans.`InvcNo`" & _
" Where SalesMaster.`INvcNo` = " & txtInvoice.Text
Set Rs1 = Db.OpenRecordset(SqlStr, dbOpenDynaset)
SqlStr = "Select * from tmp"
Set Rs2 = Db.OpenRecordset(SqlStr, dbOpenDynaset)
If Rs2.RecordCount <> 0 Then
Rs2.Edit
ItmStatus = "M"
Else
ItmStatus = "N"
Do While Rs1.EOF <> True
Rs2.AddNew
Rs2!INvcNo = Rs1!INvcNo
Rs2!Item = Rs1!Item
Rs2!Company = Rs1!Company
Rs2!Design = Rs1!Design
Rs2!Shade = Rs1!Shade
Rs2!Qty = Rs1!Qty
Rs2!MRP = Rs1!MRP
Rs2!DicsAmt = Rs1!DicsAmt
Rs2!Receiptno = ""
Rs2!Type = "Invoice Detail"
Rs2!Amount = Rs1!Amount
Rs2.Update
Rs1.MoveNext
Loop
End If
Set Rs1 = Nothing
SqlStr = " SELECT SalesMaster.`INvcNo`, Receiptmast.`Receiptno`, Receiptmast.`RAmount`, Receiptmast.`Party`, Receiptmast.`RDate` " & _
" From `SalesMaster` SalesMaster INNER JOIN `Receiptmast` Receiptmast ON " & _
" SalesMaster.`INvcNo` = Receiptmast.`InvoiceNo` " & _
" where SalesMaster.`INvcNo` = " & txtInvoice.Text
Dim sum As Single
Set Rs1 = Db.OpenRecordset(SqlStr, dbOpenSnapshot)
Do While Rs1.EOF <> True
Rs2.AddNew
Rs2!INvcNo = Rs1!INvcNo
Rs2!Item = ""
Rs2!Company = ""
Rs2!Design = ""
Rs2!Shade = ""
Rs2!Qty = ""
Rs2!MRP = ""
Rs2!DicsAmt = ""
Rs2!Receiptno = Rs1!Receiptno
Rs2!Type = "Recipt"
Rs2!Amount = Rs1!RAmount
sum = sum + Rs1!RAmount
Rs2.Update
Rs1.MoveNext
Loop
SqlStr = " SELECT " & _
"SalesMaster.`INvcNo`, SalesMaster.`Date`, SalesMaster.`TotAmt`, SalesMaster.`VAT`, SalesMaster.`Gtotal`, " & _
"tmp.`Item`, tmp.`Company`, tmp.`Design`, tmp.`Shade`, tmp.`Qty`, tmp.`MRP`, tmp.`Type`, tmp.`Receiptno`, tmp.`Amount`" & _
"From" & _
"`SalesMaster` SalesMaster INNER JOIN `tmp` tmp ON " & _
"SalesMaster.`INvcNo` = tmp.`INvcNo`" & _
"where SalesMaster.`INvcNo`=" & txtInvoice.Text
CrystalReport1.SQLQuery = SqlStr
CrystalReport1.Formulas(0) = "Party_name = '" & TxtParty.Text & "' "
CrystalReport1.WindowWidth = 5000
CrystalReport1.Formulas(1) = "Start_dt = '" & Format(DTPickerS, "dd/mmm/yy") & "' "
CrystalReport1.Formulas(2) = "End_dt = '" & Format(DTPickerE, "dd/mmm/yy") & "' "
CrystalReport1.Formulas(3) = "Today_dt = '" & Format(DTPickerT, "dd/mmm/yy") & "' "
CrystalReport1.Formulas(4) = "Invoice_no = '" & txtInvoice.Text & "' "
CrystalReport1.Formulas(5) = "Sum_Receipt = '" & sum & "' "
CrystalReport1.ReportFileName = App.Path & "\Reports\tmp.rpt"
CrystalReport1.Action = 1
Withe Regards
Alok Singh
|
|
|
|
|
It's impossible to tell you what's wrong if we don't know what the result is supposed to be and what the code is actually doing!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i met up with "conversion from type 'DBNull' to type 'String' is not valid" error when i am doing my project. My code are as follows hope someone could help.
Try
Dim strSelected As String
Dim strShutdownTime As String = DTPickerStartDate.Text + " " + DTPickerTime.Text
Dim sqlStr As String = ("Select * from EventTable")
Dim dTable As DataTable
Dim db As New DBController
Dim flagInsert As Boolean = True
Dim strActionName1 As String = ""
'Dim strActionName As String = TxtActionName.Text
dTable = New DataTable()
db.Connect("PCMgr.mdb")
db.retrieveDTable(sqlStr, dTable)
Dim TReader As DataTableReader
TReader = New DataTableReader(dTable)
If RadDaily.Checked Then
strSelected = RadDaily.Text
End If
If RadWeekly.Checked Then
strSelected = RadWeekly.Text
End If
If RadMonthly.Checked Then
strSelected = RadMonthly.Text
End If
If RadSpecial.Checked Then
strSelected = RadSpecial.Text
End If
While TReader.Read
flagInsert = False
strActionName1 = dTable.Rows(0)("ActionName")
If strActionName1 = TxtActionName.Text Then
db.Connect("PCMgr.mdb")
db.InsertRecord("UPDATE EventTable" + " set NextActionDateAndTime='" + strShutdownTime.Trim + "' where strTimeDo='" + DTPickerTime.Text + "'")
db.Close()
Else
db.Connect("PCMgr.mdb")
db.InsertRecord("Insert into EventTable" + "(TargetGroup, ActionDone,TimeDo, StartDate, NextActionDateAndTime, Frequency, Status, EndDate, ActionName) values ('" + CboChoices.Text + "','" + CboType.Text + "','" + DTPickerTime.Text + "','" + DTPickerStartDate.Text + "','" + strShutdownTime.Trim + "','" + strSelected.Trim + "','" + "Running" + "','" + DTPickerEndDate.Text + "','" + TxtActionName.Text + "')")
db.Close()
End If
If flagInsert = True Then
db.Connect("PCMgr.mdb")
db.InsertRecord("Insert into EventTable" + "(TargetGroup, ActionDone,TimeDo, StartDate, NextActionDateAndTime) values ('" + CboChoices.Text + "','" + strSelected.Trim + "','" + DTPickerTime.Text + "','" + DTPickerStartDate.Text + "','" + strShutdownTime.Trim + "')")
db.Close()
End If
End While
'TimerShutDown.Enabled = True
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
|
|
|
|
|
First up, remove the Try Catch. That will allow you to find out exactly which line is giving error. 9/10 it is complaining about some text field in being passed a null when trying to prefix and suffix a "'" to it.
Check for all the text fields marked as Not Null in the DB using String.IsEmptOrNull.
Hope this helps.
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
thanks for the advise but i am still blur. i know is tis line "strActionName1 = dTable.Rows(0)("ActionName")" which is the cause of the error but i do not know how to debug the error.My DB is empty for the start and i am not suppose to hardcode any data into the DB. but after it is use once i need to check if the record exist so there wont be any repeat record and so i cant use insect only. Any idea in what i can do to debug tis error?
|
|
|
|
|
Subjugate wrote: "strActionName1 = dTable.Rows(0)("ActionName")"
I may not be able to advise you how to debug it since I dont know where the code resides, the general architecture etc.
However, you can test dTable.Rows(0)("ActionName") for DBNull by
IsDBNull(dTable.Rows(0)("ActionName")), if it is, assign
strActionName1 = ""
Please note that it is always good to assume that anything coming from the DB maybe null.
Hope this helps.
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
i tried using IsDBNull(dTable.Rows(0)("ActionName")) but the ans is false and i oso tried to assign strActionName1 = "" but it just pop out the same error. So confused dun know where is the fault.
|
|
|
|
|
Can we see the entire code?
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
the entire code of the button i already paste it on the 1st forum already.. or wat entire code u referring to?
|
|
|
|
|
You said that you had checked for IsDBNull etc. can you please post the updated code.
Also, why cannot you debug successfully?
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
Hi,
strActionName1 = dTable.Rows(0)("ActionName")
here you should use like
strActionName1 = trim(dTable.Rows(0)("ActionName") & " ")
OR
before assigning value from db to string check for null
Regards,
S Kumar
|
|
|
|
|
thanks a lot man.. the error does not occur again..
|
|
|
|
|
how to get a height of details section in crystal report.
i.e. total height covered by all records.
i m having crystal report 9.0 and have a report containing item description whose name lenght is not fixed.
so height of each record depends on height of item description field.
how can i get height of details section after formatting details section ?
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
I have link my SQL in my data enviroment on running some procedure.
But how can i should those SQL result at my data grid?? i have set data resource to my data enviroment but when i run it, it was blank..?? only the Column title but data was blank..?
|
|
|
|
|
post the code where your binding the data to the datagrid. Sounds like you've assigned the data source but never bind it. Or the data source is sending you no data.
|
|
|
|
|
no code all in properties.
DATAGRID properties i set:
DATAsource: dataenvoriment1
datamember: command1
when i try to retrieve, yes the column title data show out.
when i try to run it suppose the datagrid will show some data but it's blank.
About my SQL is correct cause b4 that i use ADODC1 to link to datagrid and show the data show correctly. but when i try to use dataenviroment it not showing data out.
|
|
|
|
|
when the datagrid is needing to be displayed you'll need to execute the data command and bind the data to the datagrid. IE...
DataGrid1.DataSource = dataenvoriment1<br />
DataGrid1.DataMember = command1<br />
DataGrid1.DataBind()
|
|
|
|