|
Hi,
Iam connecting with my SQL Server 2005 [SQl SERVER Authentication] on LAN Network by Remotely.
------------------------------------------
Data Source=1.1.1.2; initial Catalog=Ep_Mngment; User Id=FORUSERS; Password=XXX
------------------------------------------
My clarification is , when I put the program [vb.net] in network drive, all my users will access the same program.
So the above connection can be usefull for multiaccess [also multi user login at single a/c] at same time?
will it be a problem?
Thanks
|
|
|
|
|
Paramu1973 wrote: Data Source=1.1.1.2; initial Catalog=Ep_Mngment; User Id=FORUSERS; Password=XXX
Your connection string has nothing to do with this, unless you set the database up in such a way that the user FORUSERS is limited to a certain amount of simultaneous connections.
Making the app run from a network drive will be tricky, but assuming that you have successfully tested this, every time a user executes your program, it will create a new instance in the user's own PC's memory, and therefore its own connection to the database.
But beware of the application writing logs (text files), and stuff like that, to the program's own directory.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Use the rule: "what are the absolute minimum amount of rights that I can give a user and they can still complete their job".
So you tell us....
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
hi :
I want to write a program that gets numbers in voice then write them into the text file .
I think I must compair two audio files to make it .
please help me about this problem .
my language is not English.
tanks .
|
|
|
|
|
It's called "Voice Recognition", and just comparing two audio files isn't going to do it.
Google for "Voice recognition" or "speech recognition" for software that can do this.
|
|
|
|
|
Speech recognition. If you're using version 3.0 or 3.5 of the .net framework, then look into the SpeechRecognitionEngine[^] class, and in particular the SpeechDetection event, the RecognizeAsync method and the LoadGrammar method (so you can load the numeric grammar)
|
|
|
|
|
Ah, I forgot about that little corner of the namespace. I've been stuck in .NET 2.0 for so long, I forgot there's a whole other world out there!
|
|
|
|
|
Yeah, I love corners. Finding them and seeing how they interact just makes my day - I really feel I learned something
|
|
|
|
|
Very cool, I was unaware about that as well.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Sr.No Crop Variety Packing Pkts
1 Cot 589 SG 10 8
2 Cot 789 G 1 120
3 Cot 789 G 1 100
4 Cot 789 G 1 15
5 Cot 789 G 1 150
6 Cot 789 G 1 200
7 Cot 789 G 1 2500
8 Cot 789 G 1 200
9 Cot 789 G 1 512
10 Cot 789 G 1 454
11 Cot 789 G 1 454
12 Cot 789 G 1 454
13 Cot 789 G 1 656
14 Cot 789 G 1 455
15 Cot 789 G 1 88
16 Cot 789 G 1 788
i have above grid data in my vb package
when i modify colum 4 and row 4 and save the record but it has been
change colum 4 and row 10 automatically
please help me
thanking you
kishor
|
|
|
|
|
How are we supposed to help you?
Provide code (as little as possible but still enough to make out what's happening).
Did you try debugging it? (step thru it step by step)
What language? (VB.NET or vb6)
|
|
|
|
|
Dear Sir
Thank you replies for my problem
my allication is based on VB6
secondly this happen only when i add max record and same continue variety
please see following code
rivate Sub cmdDetAdd_Click()
DetRecordStatus = RecNew
mDetailStatus = DetailNew
Call ClearDetails
Call SetDetButtonStatus
If HdrRecordStatus <> RecNew Then
txtIndentRefNo.Enabled = False
cmdIndentRefNo.Enabled = False
Else
txtIndentRefNo.Enabled = True
cmdIndentRefNo.Enabled = True
txtIndentRefNo.SetFocus
End If
If Len(Trim(txtCrop.Text)) = 0 Then
txtIndentRefNo.SetFocus
Else
'txtLotNo.SetFocus
End If
End Sub
Private Sub cmdDetModify_Click()
If HdrRecordStatus = RecNew Or HdrRecordStatus = RecModify Then
DetRecordStatus = RecModify
Call AddDetailsToControls
GridRow = flxDetail.Row
Call SetDetButtonStatus
'txtNoOfBags.SetFocus
txtVariety.SetFocus
End If
End Sub
Private Sub cmdDetDelete_Click()
On Error GoTo ErrHandler
Dim strQry As String
Dim RowCnt As Integer
Dim IsBeginTrans As Boolean
IsBeginTrans = False
With flxDetail
If .Rows > 1 Then
GridRow = .Row
If GridRow = 0 Then Exit Sub
Call AddDetailsToControls
If MsgBox("Do you want to delete the Marketing seed despatch detail of lot number " & Chr(13) & _
.TextMatrix(GridRow, SOLotNoCol), vbYesNo) = vbNo Then Exit Sub
If .TextMatrix(GridRow, SOStatusCol) = DetailExisting Then
If Len(Trim(.TextMatrix(GridRow, SOInvisibleLotNo))) > 0 Then
strQry = "Delete from MktDespatchDet " & _
" Where MktDespatchRefNo = '" & Trim(txtDespatchRefNo.Text) & "'" & _
" and MktLotNo = '" & Trim(.TextMatrix(GridRow, SOInvisibleLotNo)) & "'"
gNSLConn.BeginTrans
IsBeginTrans = True
gNSLConn.Execute strQry
strQry = "Update MktLotMst set " & _
" NoOfBags = NoOfBags + " & Val(.TextMatrix(GridRow, SONoOfBagsCol)) & _
", IsExists = 'Y' " & _
" Where LotNo = '" & Trim(.TextMatrix(GridRow, SOInvisibleLotNo)) & "'"
gNSLConn.Execute strQry
gNSLConn.CommitTrans
IsBeginTrans = False
End If
End If
If DeleteMSFGRow(flxDetail) = False Then
MsgBox "Error in Flexgrid Row Deletion"
GoTo ErrHandler
End If
Call cmdDetClear_Click
End If
End With
Exit Sub
ErrHandler:
If IsBeginTrans = True Then
gNSLConn.RollbackTrans
End If
Call ErrorLog(Err.Number, Err.Description, Err.Source, Me.Name, "cmdDetDelete_Click")
End Sub
|
|
|
|
|
Hi to all,
I have an VB.NET2005 application.
I want to run the application on windows start up. The user should see only the application screen.
All I need is to stop the user to do anything in the system(before my application Run).
Later he should be able to exit the application and do other staff(like opening the explorer etc)
Is there any registry settings for this?or may be some other method
Thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
Hi,
Add the application exe in the startup in your system.
Thanks
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|
|
thanks for the reply
But I guess it will take some time to run the application.By that time user can do anything(eg: opening MyComputer) on the system. Which I want to avoid for security reason.
Is there any method for the same.
Thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
Try making a windows service instead of a windows application.
|
|
|
|
|
0) Do not cross post please (you posted in 3 forums)
1)
himangshuS wrote: All I need is to stop the user to do anything in the system(before my application Run).
Bad, very bad, your application should never prevent users from working on there pc.
himangshuS wrote: Later he should be able to exit the application and do other staff(like opening the explorer etc)
Beter
As to how to do this, I'm afraid you can't. the only thing you can try is to have a boot screen in your application that is topmost and fullscreen.
|
|
|
|
|
Hello all. I am trying to write a simple program that defines a Car class and writes an XML Serialized Car object to an XML file. This is a Console app. Right now, I have the XMLSerializer Object defined and initialized with Module Scope. Within the main method, I create a filestream and a streamwriter that I pass to it to write the serialized Car object to the file. This works fine, but when I re-open the program after closing it, it cannot read the object back in once more than one have been written to the .xml file. I assume that this is because when a second object is written to the file, the xml header is re-inserted into the same file, and it is throwing the reader off. I have posted me code below.
I am trying to learn how to read and write XML with VB. Any help would be appreciated.
Imports System.Xml.Serialization
Imports System.IO
Public Module Module1
Public xs As New Xml.Serialization.XmlSerializer(GetType(Car))
Dim car1 As Car
Dim car2 As Car
<Serializable> Public Class Car
Public Make As String
Public Model As String
Public Color As String
Private year As Integer
Public Property TheYear() As Integer
Get
Return year
End Get
Set(ByVal value As Integer)
year = value
End Set
End Property
Public Sub New()
Make = "Chevy"
Model = "Camero"
Color = "Tan"
year = 2003
End Sub
End Class
Public Sub Main()
Try
Dim fileName As String = "C:\\XMLCar.xml"
Dim f As New FileStream(fileName, FileMode.Append, FileAccess.Write)
Dim t As StreamWriter = New StreamWriter(f)
car1 = New Car()
xs.Serialize(t, car1)
t.Close()
Dim sr As New StreamReader(fileName)
car2 = xs.Deserialize(sr)
Console.WriteLine(car2.Model)
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
Console.ReadKey()
End Sub
End Module
"If you don't know where you're going, you'll probably end up somewhere else." Yogi Berra
|
|
|
|
|
change the filemode to 'create'
Dim f As New FileStream(fileName, FileMode.Create, FileAccess.Write)
or add this line before craete the file stream
If IO.File.Exists(fileName) Then IO.File.Delete(fileName)
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
That would work if I were trying to only store data from one running of the app. However, I am really trying to be able to make the XML file grow through each subsequent running of the app. I could perhaps use your idea of deleting the file each time, if I could figure out how to get each object in the file into a collection on form_load so that they could be written back to the file when the app is closing.
I am having a hard time getting my code to work with multiple objects. Is there a way to do this? Thanks.
Btw, the code from my original posting is not complete.
"If you don't know where you're going, you'll probably end up somewhere else." Yogi Berra
|
|
|
|
|
forgive...my misunderstanding.
in order to do what you want, upon every save of the serializer...add a delimiting row (like a row of asterisks). then your read part would read until it finds the delimiting row and then deserialize that chunk. read the next chunk and deserialize that...etc.
<?xml version="1.0" encoding="utf-8"?>
<Car xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Make>Chevy</Make>
<Model>Camero</Model>
<Color>Tan</Color>
<TheYear>2003</TheYear>
</Car>
***************************************************************
<?xml version="1.0" encoding="utf-8"?>
<Car xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Make>Chevy</Make>
<Model>Camero</Model>
<Color>Tan</Color>
<TheYear>2003</TheYear>
</Car>
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I have a field of Image path on database and I need to display the image of student in crystal report. I am using VS2005 with crystal report version 9. I have added the unbound column named "Image" of type system.byte in Data Set and at the load event, I have write the following code.
Dim da As New DataSet1TableAdapters.AdmissionFormTableAdapter
Dim dt As New DataSet1.AdmissionFormDataTable
da.FillByStudentID(dt, _studentID)
Dim dtCopy As New DataTable
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Code Start to Set Image
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim blankFile As String = "C:\Program Files\blank.JPG"
If dt.Rows(0).Item("ImagePath").ToString <> "" Then
Dim s As String = dt.Rows(0).Item("ImagePath").ToString
If FileIO.FileSystem.FileExists(s) Then
Dim fs As FileStream = New FileStream(s, FileMode.Open, FileAccess.Read)
Dim image(fs.Length) As Byte
fs.Read(image, 0, Convert.ToInt32(fs.Length))
dt.Rows(0).Item("Image") = image
fs.Close()
Else
Dim fs As FileStream = New FileStream(blankFile, FileMode.Open, FileAccess.Read)
Dim image(fs.Length) As Byte
fs.Read(image, 0, Convert.ToInt32(fs.Length))
dt.Rows(0).Item("Image") = image
fs.Close()
End If
Else
Dim fs As FileStream = New FileStream(blankFile, FileMode.Open, FileAccess.Read)
Dim image(fs.Length) As Byte
fs.Read(image, 0, Convert.ToInt32(fs.Length))
dt.Rows(0).Item("Image") = image
fs.Close()
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Code End to Set Image
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
dtCopy = dt.Copy
Me.rptAdmissionForm1.SetDataSource(dtCopy)
Me.rptAdmissionForm1.SetParameterValue("ID", _studentID)
When I run the code, error comes that "unable to cast type of system.byte to system.IConvertible",
although the datatype of column "Image" is system.byte, and when I debug the code, it shows the datatype of dt.Rows(0).Item("Image") = System.DBNull, Please help me out..!
|
|
|
|
|
For x = 0 To y
RandomNumber = RandomClass.Next(i)
Next x
is the Code I'm using what I'm wondering is there a way to check and make sure the same random number doesn't get picked twice?
|
|
|
|
|
The principle is that you would need to store each number you generate, and check each new random number against that store. Could get very expensive if you are generating a large number of random numbers.
|
|
|
|
|
I understand to use it as an array and check it against each other however I don't know the code you would use to check
RandomNumber(r) where r were to equal 9 against 0-8 if you could help me with that I'd greatly appreciate it.
|
|
|
|