|
|
hi all, i have a question, how to save image in access. can someone please help me..
areon25
|
|
|
|
|
|
You can get the complete visual basic source I submitted on
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=13693&lngWId=1
This is an ocx tha will add the photo outomatically for you just.
Check it out.
Rodney Godfried
Tiger Group/Pillar Software
|
|
|
|
|
hi all..
i have a question about how to filter the data.. acctually, what know how to filter data is
object.recordset.filter = filterstring
for example
adodc1.recordset.filter = "author = 'david'"
the question from the example above, it will filter only the word david..
so how i want to filter all the name david ??
for example in my database there are many david like david reader, david blake and what ever david, so how i want to filter all the name david??
after i filter it, how i want to display all record back..
what i do is with this code
adodc1.recordset. filter = ""
or
adodc1.recordset.filter = adfilternone
but there are nothing happen.. actually, i display my data with datagrid..
can someone know how to solve the problem..
thanks..
areon25
|
|
|
|
|
areon25 wrote: adodc1.recordset.filter = "author = 'david'"
the question from the example above, it will filter only the word david..
so how i want to filter all the name david ??
for example in my database there are many david like david reader, david blake and what ever david, so how i want to filter all the name david??
after i filter it, how i want to display all record back..
what i do is with this code
adodc1.recordset. filter = ""
or
adodc1.recordset.filter = adfilternone
but there are nothing happen.. actually, i display my data with datagrid..
can someone know how to solve the problem..
thanks..
I also used to work with data in access or from vb6. I never use filter to get data. But it doesn't mean that it is wrong at all. What I usually done is query data by using sql statement. I suggest you to read some information from here[^], and you might get some idea relate to your question.
|
|
|
|
|
hi all..
i have a problem writing a program in vb and access as my database. actually, i want to add/minus data in my field in my database in access.. for example..
field1(Item)..................field2(Quantity)
Item1...........................5
Item2...........................8
Item3...........................9
Item4...........................3
for the example above, in my database in access there is a table with 2 field that is field1(Item) and field2(Quantity) where the datatype for field2 is in number. so how can i add/minus in field2 for example in row1 field2, i want to add the data make it 6 and the table like below..
field1(Item)..................field2(Quantity)
Item1...........................6
Item2...........................8
Item3...........................9
Item4...........................3
can someone please help me..
areon25
|
|
|
|
|
That is relate to a basic SQL statement in Ms access. I suggest you to read this article[^] to get some idea about SQL statement which relate to what you need.
|
|
|
|
|
I’m using Visual basic to code a program tat is going to be used in conjunction with the company I’m working for's software. this will then return some data and is displayed in several (note not just 1 but in 5 different) text fields. but heres the hard part. i have an open notepad document untitled (its unsaved at the moment) and I want to past the data from the text fields into this open notepad. So far I have managed to output to a pre-safe .txt file which can be opened later and I have managed to copy all the information to clipboard to be pasted manually later (it was tricky to find out how to put a carriage return at the end of each field but i found the solution by using vbCrLf). but what I’m looking for is 2 things. first when i press the button i want it to copy and past the data straight into the notepad program with out any further intervention and second I want to try and us the tab command instead of the carriage return. Because later I want to use another program rather than notepad called HEAT. in this program ill be taking address lines 1 to 5 and so when the past command goes in it will put line 1 in first then tab to the second line to be pasted and then tab to the third line and so forth. but this is keeping in mind that the curser in HEAT is in the right place to start with.
so far hears my code for the button. When the button is clicked it will take the text of all the field label and then put them into a variable. this variable is then copied into the clipboard.
*********
Private Sub Command1_Click()
Dim alladdress As String
alladdress = ad1.Caption + vbCrLf + ad2.Caption + vbCrLf + ad3.Caption + vbCrLf + ad4.Caption + vbCrLf + pc.Caption
Clipboard.Clear
Clipboard.SetText (alladdress)
End Sub
*********
I know real easy this bit
but is their any one out there that can help me with the hard bit. Thanks
Maxious
P.S some one advised me to look up sendkey on msdn but its not installed on my computer and the website is not much help
|
|
|
|
|
I doubt SENDKEY will help. It is not synchronous with running code so you can't easily control when the key gets sent, and it can only be sent to the active window. At least I've tried many times to get SENDKEY to work and have had minimal success...
About the other part I don't have much advice.
|
|
|
|
|
I am writing a Windows app that is specific to a user so we will be connecting to a SQL Server database. I am having the hardest time finding what to do with a connection string in this circumstance.
I can encrypt the string and store it in the app.config, I already am doing that but I have to store the key somewhere that I can get it back out. I know that storing straight strings in an assembly is risky since it doesnt take much in order to see them, so what can I do in this situation where this app will be installed on various machines?
So to ask a direct question, how can I store the connection string where I can get to it but dont have to store an obvious string in the assembly? If I have it installed into the registry, it is still straight text in my install package, if I encrypt it then the key is still straight text in my assembly, and Ive read some articles about DPAPI but that doesnt sound like exactly what Im looking for.
Please help,
Cleako
|
|
|
|
|
As I'm sure you know, there is no such thing as perfect security. In most cases all you need to do is figure out your target audience and what level of security will sufice for your purposes. It usually take to figure out something that will keep *most* hackers out.
This is a first and simple step you could take to further secure your connection strings. Encrypt them and instead of storing the key as a string in your code, obfuscate it a little bit. I'm going to give you a simple example of what that means but you can derive and go nuts with it.
let's say you have the following key "mypass123".
Dim i As Integer ' A counter
Dim str(9) As Byte ' This array will store the ASCII codes of the characters in the key
Dim keyLength As Integer ' This will store the keyLength
Dim keyString As String ' Variable used to store the key at the end, as a string
str(0) = 109 ' ASCII code for "m"
str(1) = 121 ' ASCII code for "y"
str(2) = 112 ' ASCII code for "p"
str(3) = 97 ' ASCII code for "a"
str(4) = 115 ' ASCII code for "s"
str(5) = 115 ' ASCII code for "s"
str(6) = 49 ' ASCII code for "1"
str(7) = 50 ' ASCII code for "2"
str(8) = 51 ' ASCII code for "3"
keyLength = 9 ' manually specify the length of the key
' Load keyString with the key, by appending the characters of the key
keyString = ""
For i = 0 To keyLength - 1
keyString = keyString + Chr(str(i))
Next i
' Now you can use keyString as the key to unlock your connection string
obviously you can improve the method of obfuscation even further. Here's an example:
str(0) = 109 ' ASCII code for "m"
str(1) = str(0) + 12 ' ASCII code for "y"
str(2) = str(1) - 9 ' ASCII code for "p"
str(3) = str(2) - 15 ' ASCII code for "a"
str(4) = str(2) + 3 ' ASCII code for "s"
str(5) = str(4) ' ASCII code for "s"
str(6) = 49 ' ASCII code for "1"
str(7) = str(6) + 1 ' ASCII code for "2"
str(8) = str(7) + 1 ' ASCII code for "3"
----
www.digitalGetto.com
|
|
|
|
|
Wow, sounds pretty reasonable.
Thanks,
Cleako
|
|
|
|
|
Hi guys,
I'm doing a program that able to login to the website without going to the website using HTTPPost. I face this problem when I need to login into PHP sites, Java Script sites are ok.
I use http://www.somesite.com/members/member-menu.php?username=UN&password=PWD but it seems it can't read the username and password that I pass over, I'd tried with another PHP site,also the same.
This is what I did in my VB.NET code
Dim PostData As String = _
"?" & usernameText & "=" & UN & _
"&" & passwordText & "= " & PWD
Data = encoding.GetBytes(PostData)
So the PostData is suppose to be send to the site to get the cookie but it return a result saying my username and password invalid, I'd tried the username and password on the site which work well. I try hashing them then only send them but with the same result, invalid username and password.
Would appreciate if anyone would give me some idea about this
J Liang
|
|
|
|
|
|
in code
AxMediaPlayer1.FileName="c:\temp\test.avi"
AxMediaPlayer1.Play
working properly, but when I try to play .wmv
files
AxMediaPlayer1.FileName="c:\temp\test.wmv"
AxMediaPlayer1.Play
i got error in line axmediaplayer1.play
files test.avi and test.wmv exist adn they work properly in any player
Why?
I think that this error is same one as if I dont have file or file is wrong.
"An unhandled exeption of type
System.runtime.interoptservices.COMExeption
occured in axiteropt.mediaplayer.dll
Additional information: Unspecified error"
File test.wmv exist and work in Windows media player when i start his directly
Thanks in advance
|
|
|
|
|
I'm a new user using VB.NET. I would kike to know how you use config File as a connection string
siwe
|
|
|
|
|
Can u express yoru question again I don't understand.
Regard
Socheat
................
|
|
|
|
|
In my options page has 2 button, 'Save' and 'Cancel'.
After i doing changes for all particular fields in options page, then i click 'Save' button to save it. It works successfully.
But my problem is if user click button 'Cancel', then my program should rollback all transaction and the data will back to previous data before i click the 'Save' button.
So, has any coding to do rollback transaction in VB6??
Angela
|
|
|
|
|
That all depends on what you mean by "transaction".
But normally, you'd let the user pick a bunch of options in the dialog and not apply any of those changes until the user clicks Save or OK. Until then, you can just not do anything if the user clicks Cancel.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello everybody
I'm workin' on a project in which i have to load an image in an image box every period of time so i'm using a timer to do that, this image comes from another PC using the MScomm.
The problem is that if the image didn't comletely and correctly arrive the computer stuck, even if i put "on error resume next" at the top of the timer.
So is there any way i can check if the image is valid before loading it in the image box.
I appreciate your cooperation and thank you very much.
|
|
|
|
|
What kind of image are you using (what format). Also, did you write the other application that sits on the other computer and sends the images over MSComm?! If so, I would add a checksum to every transmission and check that first, before displaying the image. This would tell you if something got corrupted on the way..
----
www.digitalGetto.com
|
|
|
|
|
How can i read my mails from Exchange Server with MAPI ASP Application
i need some MAPI Codes...
|
|
|
|
|
hi i have made two function readwav() and writewav()
----------------------
algo for readwav func
----------------------
reading the wav file in following sequence
1.check the 'WAVE' chunk
2.check the 'fmt ' chunk
3.read the wavformat info of that wav file and store in type
4.check the 'data' chunk
5.read the no of bytes in file
-------------------------
algo for writewav func
-------------------------
writing the wav file in following sequence
1.write the 'WAVE' chunk
2.write the 'fmt ' chunk
3.write the wavformat info that i store in type while reading
4.write the 'data' chunk
my ques is who i read a wav buffer from a open wav file and
how i write a wav buffer in wav file
means how i write another readbuffer() and writebuffer() func's
plz help me
|
|
|
|
|
I would like to run the VB Application having MS Access Database as the back-end. Condition is the application is in .exe format & there is no setup. The VB Application is not to be installed on the Computer but must be run from the CD.
|
|
|
|