|
if the service doesn't runs under DOMAIN user account who has the privilege to that mapped folder, any other ways that we can access to Mapped Folder or Network Drive?
Need guide, Thanks!
|
|
|
|
|
Everyone,
I'm using Crystal Reports that came with VS 2003. I'm using a recordset as the datasource to show for the report. The problem I'm getting is I am getting duplicate records. The data is coming from a PostGres database. What I'm trying to show are transactions for people who prepay to a card. Some people might recharge more than once in a day. When that happens, duplicate records occur. Here is the code to get the recordset.
dim rsReport as New Adodb.Recordset
strSearch = "SELECT c.crd_id, c.membernumber, c.firstname, c.lastname, u.moneyadded, u.dateadded, u.timeadded FROM userbalance u inner join transaction t on u.transid = t.transid inner join card_user c on c.crd_id = t.transcardid WHERE u.dateadded >= '" & dtFrom & "' AND u.dateadded <= '" & dtUntil & "' AND t.transid <> '0' "
strTester = strSearch
With rsReport
.CursorLocation = ADODB.CursorLocationEnum.adUseClientBatch
.Open(strSearch, conConnect, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
End With
The code to link recordset to report.
rptMoneyAdded.SetDataSource(rsReport)
rptV1.ReportSource = rptMoneyAdded
rptV1.RefreshReport()
I checked the recordset in a datagrid and it comes out fine. I know about the "SuppressIfDuplicate" but I can't use that because if 2 transactions are back to back by the same person, then the report will supress the second transaction. Any help will be nice. Thanks.
|
|
|
|
|
Try using distinct keyword in the sql query .
abhinav
|
|
|
|
|
Sorry that did not work. Any other ideas?
|
|
|
|
|
Hi
I need to start a connection to a linux box from a VB 6.0 application? Is it possible at all? If yes, how? I tried looking at the Winsock API but couldn't gather how to use it?
Thanks
|
|
|
|
|
You going have to be more specific. What are your tring to connect to? How are you tring to connect? Is it a database, shared folder?
|
|
|
|
|
I just want to start a shell on a linux machine where i can type in commands to do stuff. I should be able to see the results of those commands and any error messages.
Thanks
|
|
|
|
|
I have a DropDownList and a Button on a form. The user selects an item from the DropDownList and clicks the button. I want to check the text value of the DropDownList in the Button_click event with the following code.
If Me.DropDownList1.SelectedItem.Text = "" Then
' do something
End If
But no matter what item I select in the DropDownList Me.DropDownList1.SelectedItem.Text always equals "". How can I get the text value of the item selected?
|
|
|
|
|
Most probable cause - your Page_Load is setting a data source for the drop down, and is doing it every time ( which resets the selection ). You should do this in Page_Prerender anyhow, but either way, it shoud be in a block to make sure it only happens with IsPostback = false
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
I need to do an "AND" statment in my selection formula
CrystalReportViewer1.SelectionFormula = "{events.ddate} = " & (moddate) & "" And "{child.name} = '" & (modname) & "'"
each formula works on its own but when I run them togther I get an error about child.name can not be converted to a long
I have also tried
CrystalReportViewer1.SelectionFormula = "{events.ddate} = " & (moddate) & "" & "{child.name} = '" & (modname) & "'"
That gives me an error that say "The rest of the statement does not look apart of the formula"
HELP!
1. Out of clutter, find simplicity.
2. From discord, find harmony.
3. In the middle of difficulty lies opportunity.
Albert Einstein
three rules of work
|
|
|
|
|
Hi all;
I am not expert in vb.net so
I need Tutorial or source code to open
web cam on vb.net form (application)
and capture picture form it and save
it ofcourse as bitmap image.
I searched and I didnt found any thing.
THANKS
AMR-CIS
|
|
|
|
|
|
I have been having this issue for some time now. Some may remember seeing my posts over the course of the last few months.
Issue: Everything seems to work with the exception of deleting rows from the datagrid.
Err - You can delete rows if you start from the topmost record and work your way down. ??
I have posted the full code for one of the offending forms here
Ideas/advice needed and appreciated. If more information is needed, please let me know.
|
|
|
|
|
u can delete rows from datagrid
try this:
If dataset.Tables("SearchResult").Rows.Count > 0 Then
dataset.Tables("SearchResult").Rows.RemoveAt(dgrid.CurrentRowIndex)
dgrid.Refresh()
Else
MsgBox("No Data To Delete")
End If
when u populate the grid with data declare the dataset with general scope.
this worked for me. i was also going mad for months. good luck.
|
|
|
|
|
I think that the datagrid in question is a bit too complex for this to work. I tried what you had posted in the DataGrid1_KeyDown event...
If e.KeyCode = Keys.Delete Then.....
but I still immediately receive:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.DataGrid.ResetSelection()
at System.Windows.Forms.DataGrid.ResetUIState()
at System.Windows.Forms.DataGrid.SetDataGridRows(DataGridRow[] newRows, Int32 newRowsLength)
at System.Windows.Forms.DataGrid.DeleteDataGridRows(Int32 deletedRows)
at System.Windows.Forms.DataGrid.DeleteRows(DataGridRow[] localGridRows)
at System.Windows.Forms.DataGrid.ProcessGridKey(KeyEventArgs ke)
at System.Windows.Forms.DataGrid.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)
|
|
|
|
|
I am posting the full code that worked for me. it is written for a button_click event. if u want it for key_press please wait for a few days. i will ask around and tell u. the code that worked for me is:
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlDbType
Public Class Form5
Inherits System.Windows.Forms.Form
.
.
.
.
Dim dsdata2 As New DataSet
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim sqlcon2 As New SqlConnection(constr)
Dim sqladp2 As New SqlDataAdapter
Dim cmdstr1 As New SqlCommand
Dim strq1 As String
sqlcon2.Open()
strq1 = "select * from Doctor"
Try
sqladp2.SelectCommand = cmdstr1
sqladp2.SelectCommand.CommandText = strq1
sqladp2.SelectCommand.Connection = sqlcon2
dsdata2.Clear()
sqladp2.Fill(dsdata2, "SearchResult")
If dsdata2.Tables("SearchResult").Rows.Count > 0 Then
DataGrid1.DataSource = dsdata2
DataGrid1.DataMember = "SearchResult"
DataGrid1.Refresh()
End If
cmdstr1.Dispose()
sqlcon2.Close()
sqlcon2.Dispose()
sqladp2.Dispose()
Catch empexp As SqlException
MessageBox.Show(empexp.Message)
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If dsdata2.Tables("SearchResult").Rows.Count > 0 Then
dsdata2.Tables("SearchResult").Rows.RemoveAt(DataGrid1.CurrentRowIndex)
DataGrid1.Refresh()
Else
MsgBox("No Data To Delete")
End If
End Sub
End Class
Hope this will help u.
|
|
|
|
|
I am building a web form that connects to an Access database. When the DataAdpater tries to fill the DataTable the following error occurs:
The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\Database\InternalUseLog\db1.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
I'm the only one using the database so I think I need to get permission. What do I need to do to get permission?
Thanks
|
|
|
|
|
That looks like a directory under the IIS. Are you sure your db isn't already locked up by another process? What happens if you try to open it simply with Access?
|
|
|
|
|
I ran into this problem a few years back. The issue was that the folder did not provide proper NTFS permissions to rwx the file.
Hope it helps.
|
|
|
|
|
Thanks for the help, I solved it on my own.
I had to right click on the database folder and set the Web Sharing and Security properties.
|
|
|
|
|
Very simple.
All I want is to add a summary to my function or description that will be visible when I can the function from the editor.
Like when you user the object browser and it shows you the summary of each function,How do I add this summary to the function?
Thanks a lot.
|
|
|
|
|
It's called XML Documentation.
The official help is a good source of informations.
|
|
|
|
|
I'm no referring to the:
What I want is to have the function summary display in the object browser.
For example if you select the System.URI from the object browser you will get the summary:
"Provides an object representation of a uniform resource identifier (URI) and easy access to the parts of the URI."
I want to know how to add this summary to each function or class I have.
|
|
|
|
|
That's probably the description of the class.
If you have a class with methods and properties what you call summary is probably the description of the class.
Pay attention that XML Documentation requires formally correct XML.
You can point your help to:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vbalr/html/27b5b06c-09b9-496a-8245-f9542d846230.htm
|
|
|
|