|
You're welcome.
|
|
|
|
|
Hi! All
I want to save doc,pdf,jpg file to sqlserver database. please help me to store file to database. And also retrive file from the database. I am using vb.net Please try is as soon as possible.
Thanks & Regards,
Harun
harun
|
|
|
|
|
You See there is one thing you should do before you post in a Forum, not only CodeProject, in any Forum or before you ask for help. at least try to make your own research first and Google
http://www.google.co.za/search?hl=en&q=Saving+a+File+to+SQL&meta=[^]
Hope this helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Yes i do agree with you!!! this is for everyone around the forum!!!
ZAK
|
|
|
|
|
hi all,
i filter a datagrid with input into a texbox. It filters fine. But how do i bring back the original data into the grid when the textbox is empty?
code below:
'This is in the textchanged of txtQS
If Not txtQS.Text.Trim = "" Then<br />
Dim dt As TMSDataSet.LASTIDNOREFFDataTable = New TMSDataSet.LASTIDNOREFFDataTable()<br />
LASTIDNOREFFTableAdapter.Fill(dt)<br />
Dim dv As DataView = New DataView(dt)<br />
dv.RowFilter = "lastmonth = " + txtQS.Text<br />
LASTIDNOREFFDataGridView.DataSource = dv<br />
LASTIDNOREFFDataGridView.Refresh()<br />
Else<br />
Me.LASTIDNOREFFTableAdapter.Fill(Me.TMSDataSet.LASTIDNOREFF)<br />
End If
Thanx.
He who goes for revenge must first dig two graves.
|
|
|
|
|
Try setting dv.RowFilter = nothing (or it might be "")
Bob
Ashfield Consultants Ltd
|
|
|
|
|
nope, that didn't work.
He who goes for revenge must first dig two graves.
|
|
|
|
|
how .....?
24
|
|
|
|
|
have u tried googling it up?
Not successful?
Get a converter! It's far easier.
He who goes for revenge must first dig two graves.
|
|
|
|
|
First try using Google. Then write some code. Then ask nicely and someone may help you. Just demanding how.... is not going to win you many friends.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Would like to ask if anyone knows wat is the command for copying file from one folder to another non-stop?
|
|
|
|
|
Command for Copying file
My.Computer.FileSystem.CopyFile("C:\Source.txt", "C:\NewFolder\Dest.txt")
i don't understood the meaning for Non-stop
Thanks & Regards
Rajesh B
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Because i am doing a application on housekeeping. I need my hard disk space to be 80% full and test if my application is working therefore i need to keep copying file to my specify folder so that the disk space can be 80% full and allow my application to stop working. By using the way u told me i can only copy 1 specify file at a time only. Or is there a command whereby i am able to create dummy file with example like .ppt?
|
|
|
|
|
|
You could always create and open a text file and continue to append text to it, in a loop, until it reaches the desired size.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
That's going to be a HUGE file (don't know if notepad even opens that, have to test it as soon as I come home )
|
|
|
|
|
just put the code in a loop and add a variable to the copyto path
dim i as integer = 0
do while i < 1000
My.Computer.FileSystem.CopyFile("C:\Source.txt", "C:\NewFolder\Dest" & i & ".txt")
i+=1
loop
this will copy the same file a 1000 times
you could ofcourse check the harddisk space available and stop if it reaches 80% but I think that would take this to far if it's jut for testing purposes
|
|
|
|
|
A for..Next loop would be cleaner
For i As Integer = 1 to 1000
My.Computer.FileSystem.CopyFile("C:\Source.txt", "C:\NewFolder\Dest" & i & ".txt")
Next
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
True
Must be from looking at an ex-collegue's code all day (nothing but while true loops), it's driving my crazy
|
|
|
|
|
ok thanks for all the help guys... i will try it out tomolo when i reach office...
|
|
|
|
|
Dear all,
I'm using a main module to shared all the Public variable and certain main component that my system is running. I'm using VB.NET using Visual Studio 2003 connect with MySQL 5.0 database. My system is running with Window Form Application which is a small Point Of Sales System used by my sister grocery shops.
Problems that facing by me now is the module doesn't continue running after I used System.Windows.Forms.Application.Run(FrmLogin) inside my main module class. The following are the code used:
<br />
Sub Main()<br />
TerminalLocate = ConfigurationSettings.AppSettings("Location")<br />
TerminalID = ConfigurationSettings.AppSettings("Terminal_ID")<br />
<br />
If TerminalLocate = "" Then<br />
MessageBox.Show("No Location Detected !")<br />
Exit Sub<br />
End If<br />
<br />
If TerminalID = "" Then<br />
MessageBox.Show("No Terminal Detected !")<br />
Exit Sub<br />
End If<br />
<br />
Dim FrmLogin As New FrmLogin 'FrmLogin is used for user verification for the system login.<br />
FrmLogin.Visible = False<br />
FrmLogin.WindowState = FormWindowState.Normal<br />
System.Windows.Forms.Application.Run(FrmLogin)<br />
<br />
<br />
'--------------------Code after this line never run anymore---------------------------------------<br />
While UserLoginSuccessful = True<br />
<br />
Dim clsReceipt As New clsDBReceipt<br />
clsReceipt.FindLastReceipt(TerminalLocate, TerminalID)<br />
MessageBox.Show("The Receipt number =" & strReceiptNo1 & " ")<br />
End While<br />
<br />
End Sub<br />
Anyone can give me some idea how to get back the system to run back to my module and do the continous task inside my module? My next task is to get the last receipt and transaction number from the database.
Thanks for reading and hope someone can help me soon.
Regards
Drex
|
|
|
|
|
Hi Drex,
I believe your problem lies in creating another process to run your login form.
I believe you can call your login form by calling the "ShowDialog" method. Here is a way to do it:
Dim frm As FrmLogin
Dim dlgResult As DialogResult
frm = New FrmLogin
dlgResult = frm.ShowDialog
If dlgResult = Windows.Forms.DialogResult.OK Then
'---- do your receipt check here
End If
You would need to implement logic in the login form to return "Windows.Forms.DialogResult.OK" ONLY if the user logged in correctly.
Also, I strongly recommend that you not do the "While" loop to check for your receipts. VB is perfect for using event - that is, do not loop infinitely - respond to events that happen in your application.
Calling the login form how I have above will help get you there. You could even raise an event when the user has successfully logged in, and then do your receipt check.
Hope that helps.
Regards,
Grant
__________________
Grant Porteous
Your Software Licensing Guide
http://www..SerialKeyMaker.com
|
|
|
|
|
Hello Grant Porteous and all,
I am sorry for my late reply here because my internet connection down for the past few days here. I have try to put the code into my system but I have no idea how should I return a result of Windows.Forms.DialogResult.OK from my Login form. How should I return it from my Login form to my main module to run the continues data about the receipt after the user login verification?
What I did now in my project is after user login verification successful,I'll Hide the Login form and directly pass the main form which is the Point-Of-Sales form (FrmPOSTerminal). I would like to know am I doing the right design for my system to pass the directly after the verification inside my Login form to my main form Point-Of-Sales form or I should hide my Login form and
open my form using the Sub Main Module??
Hope someone can give me some idea about this. Thanks for reading.
Regards
Drex
|
|
|
|
|
We do the login and validation BEFORE we do the application.run(frmmain).
Display Login form which does the user validation and returns a boolean (and in our case a table of permissions)
If the user is validated then do the application.run to your main form, presumably your POS entry point.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello Mycroft and all ,
Currently my system is directly running the Main Module to do everything here. I use this design because I allowed the user to do some counter setting when the system loads. The user can change the receipt setting such as receipt starting number,counter name,receipt allignment and the selection of database profile as what I'm trying to develop it now.
But I'm still wondering am I doing the right design for this? Because I read some forum said that we shouldn't used the Main Module anymore in order to make our system totally object oriented. So,do you all have any idea about using Main Module for VB.NET langguage on doing window form application system??
Hope to hear someone opinion here about this. Thanks for reading.
Regards
Drex
modified on Sunday, July 27, 2008 11:51 PM
|
|
|
|