|
Start here[^]. MonganT wrote: I am now completely desperate Don't; in the worst-case scenario it'd mean that one would have to register the tlb. The world will not end.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Unfortunately that doesn't help. I work for an international company in manufacturing. The VB6 software is installed on many PCs that serve as interfaces for the workers. They have just about zero permissions and cannot register dlls. Moreover, it is against company guidelines to allow them this kind of access
In short, it has to be registration free
|
|
|
|
|
MonganT wrote: it is against company guidelines to allow them this kind of access Still doesn't mean you should be desparate; if it cannot be done because the customer does not want it, then that's the decision of the customer.
I'm out, sorry. Good luck.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Please I am doing a project that reads data from an excel sheet to a datagrid and the saves the data from the datagrid to an access database that will be created at runtime. The import to the datagrid has been done and even with that, the excel file needs to be opened literally before the datagrid can read from it. But as for the saving to the access database created at runtime, I have not been able to make any thing for it. Please help me. My project supervisor needs a working prototype by monday or by next week. Thank you all for your help.
You can PM me or email me for the source code.. Thank you once again
|
|
|
|
|
I'm afraid to have the wrong idea of how these forums work. When you find run up against a specific problem in your coding we will attempt to help YOU fix the issue. It is extremely unlikely someone is interested in doing your project work for you.
Debug you code to identify where and what the error is and post that information and we may be able to help.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Am sorry I didnt know how the forum works. I am truely sorry.. But the thing is I sent this not from my own machine so I couldnt retrieve the source code... And thanks for letting me know my ignorance levels.. I wouldnt do that next time 
|
|
|
|
|
That's alright we all started out at some time, what you want to avoid is broad based questions, get into the detail and when you run into a problem do some research and if you still can't go forward then ask. I find 98% of my problems have already been solved by someone else.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
pupinsre wrote: But as for the saving to the access database created at runtime, I have not been able to make any thing for it. The easiest way is having an empty database somewhere, and to make a new copy of that when you need to "create" one. File.Copy is easy, which would solve this problem. Bonuspoints if you tuck it in a resource-file and embed that in the executable.
pupinsre wrote: My project supervisor needs a working prototype by monday or by next week. How are you reading the Excel-file? Using an IConnection , with commands and stuff? You can do the same with the newly copied Access-database - put new records in one of the tables using an connection and some commands.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thank you so much.. will let you know whatever that happpens.
|
|
|
|
|
Did you get it to work?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thank you... I have managed to do most of the things that you guys outta here thought me. I have paused on the project for now. Will continue somewhere later since I have more learning and some exams to do.
Sorry I am replying this late. I truly am sorry for the late reply. I had no internet connection since that time... Thanks for your help buddies (serious and great programmers(my mentors)) outta here.
Better times... Greetings 
|
|
|
|
|
Hello,
I have this table
RollNo Fee ForMonth
1 500 JAN
2 400 JAN
3 300 FEB
4 400 FEB
5 400 JAN
Created a Crystal Report, Dragged Fields from the Fields List on Crystal Report.
Added a Report Viewer to Form
shows the Report
but when I add parameters it shows blank report
Here is the formula
IF (Length({?forMonth})>0) THEN
{tblFeePayment.ForMonth} = {?forMonth}
ELSE
TRUE
and below is the button Clicked event code
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
Dim cryRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
Dim strReportName As String = "RptFeeReceipts.rpt"
Dim strPath As String = "D:\Projects\SchoolManagementSystem0821\School Management System\School Management System\Reports\ReportTest.rpt"
cryRpt.Load(strPath)
cryRpt.SetParameterValue("formonth", txtmonth.Text.Trim())
Dim frm As New FeeReceiptsPrint(cryRpt)
frm.Show()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
And the FeeReceiptsPrint Code is here:
Public Class FeeReceiptsPrint
Private _cryRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument
Sub New(ByVal cryRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
_cryRpt = cryRpt
End Sub
Private Sub FeeReceiptsPrint_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CrystalReportViewer1.ReportSource = _cryRpt
CrystalReportViewer1.Refresh()
End Sub
End Class
Pls Help,
Regards.
modified 28-Nov-13 2:50am.
|
|
|
|
|
Hello, I am fairly new at programming, but I am learning. I am making a small application for my wife so she can record her babysitting scheduled through the week. Each day has three textboxes, the start time, the end time, and result. I need to know what to dim result as so I can insert the difference of the times entered into the textbox into the third textbox.
Public Class Form1
Dim startTime As String
Dim endTime As String
'Dim result As
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim dFrom As DateTime
Dim dTo As DateTime
Dim sDateFrom As String = startTime
Dim sDateTo As String = endTime
If DateTime.TryParse(sDateFrom, dFrom) AndAlso DateTime.TryParse(sDateTo, dTo) Then
Dim TS As TimeSpan = dTo - dFrom
Dim hour As Integer = TS.Hours
Dim mins As Integer = TS.Minutes
Dim timeDiff As String = ((hour.ToString("00") & ":") + mins.ToString("00"))
'result = timeDiff
End If
End Sub
Private Sub rbM1_CheckedChanged(sender As Object, e As EventArgs) Handles rbW1.CheckedChanged, rbTh1.CheckedChanged, rbT1.CheckedChanged, rbM1.CheckedChanged, rbF1.CheckedChanged
Dim rb As RadioButton = DirectCast(sender, RadioButton)
If rb.Checked = True Then
Select Case rb.Name
Case "rbM1"
startTime = m1start.Text
endTime = m1end.Text
'result = m1result.Text
Case "rbT1"
startTime = t1start.Text
endTime = t1end.Text
'result = t1result.Text
Case "rbW1"
startTime = w1start.Text
endTime = w1end.Text
'result = w1result.Text
End Select
End If
End Sub
End Class
<pre lang="vb">
|
|
|
|
|
I dimmed result as textbox and it works great 
|
|
|
|
|
You must write the result to the Text property of that TextBox. When you do
startTime = w1start.Text
you read the text from the TextBox w1start into the variable startTime .
That is a oneway operation: it happens at that one moment when that line of code gets executed. No connection of the TextBox and the variable remains (if you want to do such a thing, look for "binding").
Hence when you want to update the value shown in the TextBox after changing the value of the variable, you need to do the operation the other way round:
w1result.Text = result
Do that after you assigned a value to result .
|
|
|
|
|
Hi,
I Have a form in VB.Net Auto scroll property to true, Contains Two datagridview with 150 rows in each, lets say TopDGV & BottomDGV.
In run mode when i click any cell of BottomDGV when scroll bar is in top, it select the range of cells from BottomDGV and scrollbar gets down. In the same way if my scroll bar is in bottom and i click on TopDGV it selects the range of cell from TopDgv.
Does anyone faced this sort of issue...I googled a lot, but did not find solution on this.
Thanking in Anticipation.
Dipesh
|
|
|
|
|
This may be a silly question but do the DGVs use the same collection as a datasource?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm trying to sort my GridView using a User Session but whenever I run my program I get an error message saying 'Cannot find Column Name' but the table columns are correct so I don't know why I'm getting the error message.
If Not Page.IsPostBack Then
BindEmpGrid()
txtSearch.Enabled = False
Dim dt As New DataTable()
**** I'm sure the line below is whats causing the error *******
grdEmp.DataSource = dt
Session("data") = dt
End If
Protected Sub grdEmp_sorting(sender As Object, e As GridViewSortEventArgs) Handles grdEmp.Sorting
Dim dataTable As DataTable = TryCast(Session("data"), DataTable)
If dataTable IsNot Nothing Then
Dim dataView As New DataView(dataTable)
dataView.Sort = Convert.ToString(e.SortExpression) & " " & ConvertSortDirection(e.SortDirection)
grdEmp.DataSource = dataView
grdEmp.DataBind()
End If
End Sub
Private Function ConvertSortDirection(sortDirection1 As SortDirection) As String
Dim newSortDirection As String = [String].Empty
Select Case sortDirection1
Case SortDirection.Ascending
newSortDirection = "ASC"
Exit Select
Case SortDirection.Descending
newSortDirection = "DESC"
Exit Select
End Select
Return newSortDirection
End Function
|
|
|
|
|
Commish13 wrote: Dim dt As New DataTable()
**** I'm sure the line below is whats causing the error *******
grdEmp.DataSource = dt
Session("data") = dt
Well, a New DataTable is empty - it has exactly zero rows and exactly zero columns. Conseqeuently you cannot sort by columnname - it does not exist.
|
|
|
|
|
I'm trying to call 2 different Stored Procedures from 1 function that I have in a separate class page. Everything is the same Connection, SearchBy, SearchVal, etc.. except the Stored Procedures are different. Is it possible to place 2 different Stored Procedure in the code like this?
Public Shared Function SearchEmpRecords_Sp(searchBy As String, searchVal As String) As DataTable
Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("strName").ConnectionString)
Dim adp As New SqlDataAdapter()
Dim cmd As New SqlCommand()
Dim cmd2 As New SqlCommand()
Dim dt As New DataTable()
Try
cmd.CommandType = CommandType.StoredProcedure
** My 2 Different Stored Procedures **
cmd.CommandText = "SearchEmpRecords_Sp"
cmd.CommandText = "SearchEmpRecords_Sp2"
cmd.Parameters.AddWithValue("@SearchBy", searchBy)
cmd.Parameters.AddWithValue("@SearchVal", searchVal)
cmd.Connection = con
adp.SelectCommand = cmd
' con.Open()
adp.Fill(dt)
Return dt
Catch ex As Exception
MsgBox(ex.Message)
Finally
adp.Dispose()
con.Close()
End Try
End Function
|
|
|
|
|
cmd.CommandText = "SearchEmpRecords_Sp"
cmd.CommandText = "SearchEmpRecords_Sp2"
What do you think will be the contents of cmd.CommandText after these two statements? You need to run your adp.SelectCommand twice, first with one command and its parameters, and second with the others.
Veni, vidi, abiit domum
|
|
|
|
|
Assuming he would concatenate the strings, would it work? I'd say that it probably would work, since one can put multiple SQL-statements in a command.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yes of course, but not something many modern devopers use.
Veni, vidi, abiit domum
|
|
|
|
|
Commish13 wrote: Is it possible to place 2 different Stored Procedure in the code like this? Dunno; I assume you tried the code you posted. If it didn't work; what error did it throw?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|