|
I have a program .net, and a mysql database. My problem is how to compile the database and my program into one. Please help me,,,,
|
|
|
|
|
You can't.
.EXE's, when running, cannot be written to, which would make your database read-only anyway.
On top of that, the MySQL engine doesn't support reading a database inside an executable.
Your database must be a seperate file.
|
|
|
|
|
Thansk Mr Dave Kreskowiak,,,,,
|
|
|
|
|
Hi All,
I have a database called cohort in sql server 2008 r2 express with a table called school with the following fields; schoolname,schoolcode,zone,district,division.I also have vb 2010 form with five comboboxes.Now my question is how can i link comboxbox1 to table field schoolname,combobox2 to schoolcode,combobox3 to zone,combobox4 to district,combobox5 to division. And how to apply filter in combobox.For example if i select a particular division in combobox the next combobox for zone should only display zones for that particular division etc. I have tried to add data source to my vb application but cannot access it. Is there any coding that can substitute data objects on the form. I have managed to write a connection string for the database.
|
|
|
|
|
i would love to change windows button to keep pressed when i press it and back to the normal state when pressed again.
does windows button support dat?
|
|
|
|
|
You could use the FlatStyle options, Unpressed is Standard, Pressed I believe if represented as Flat.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button1.FlatStyle = FlatStyle.Flat Then
Button1.FlatStyle = FlatStyle.Standard
Else
Button1.FlatStyle = FlatStyle.Flat
End If
End Sub
Hope this helps
|
|
|
|
|
Take a CheckBox and change the Appearance property from Normal to Button and it will behave exactly as you want. Respond to the CheckChanged event to find out when the 'pressed' state changes.
Alan.
|
|
|
|
|
|
Hi!
I would like to know if the Copy to Output Directory property can also
be useable in source code when it comes to all file types?
So far, it has its use for components and web applets.
Can this be done in source code?
Thanks in advance for your responses.
JohnPDB
|
|
|
|
|
What options do you see when you view the properties for the source file?
|
|
|
|
|
What I'm trying to ask does the "Copy to Output Directory" property is included in the Intellisense and then a user tries to assign the property to one of the three values: copy always, copy if new, do not copy. A user would assign the property to the value, Do Not Copy.
Any questions or comments?
|
|
|
|
|
JohnPDB wrote: does the "Copy to Output Directory" property is included in the Intellisense
There is no intellisense attached to files in the Solution Explorer window. A simple test (mouse over) should confirm it.
|
|
|
|
|
I am making a website in classic asp, and I want to upload image files and save them in a specific folder later I'll need those files which means I also have to retrieve those files, can anybody tell me how to do this in classic asp?
|
|
|
|
|
I have written and currently maintain a VB6 legacy app for a client. There are thousands of copies running successfully all over the world... with one exception. One of my client's customers installed the software on a WIN7 system and gets the RTE 339 - tabctl32.
The weird part is that if he boots in safe mode, it works perfectly. I have told my client to use regsrv32 in admin mode to un-register and re-register the ocx. He gets a successful completion when doing so but still gets the RTE 339 error.
I have had the client run "Handle.exe" to see if any process that loads during a normal startup might have a lock on the ocx but the results show nothing.
Anyone have any ideas as to why this would work in safe mode but not on a normal boot?
|
|
|
|
|
Search the system for tabctl32. Chances are really good you have multiple versions on the machine. Your app might not work with the one that's currently registered on the machine. You'll have to dig through the registry to find which one that is.
When it works in safe mode, it's using the one that Windows 7 came with because the control registration is reverted back to defaults.
|
|
|
|
|
Thanks Dave, I'll give it a shot and let you know how I make out.
|
|
|
|
|
I suspect you have an earlier version on that machine.
Look in Windows\System32 or Windows\SysWOW64 (for 64-bit systems) and check the version. 6.0.90.43 and up work fine on Windows 7.
You can just copy the newer one over the others (after unregistering of course).
Alternatively you can just put the ocx in with your binary. VB 6 looks first in the folder that the binary is started in, then in Windows\System.
Don't forget that Windows 7 is a bitch to install in. If you're using InstallShield then make sure that the installation requires Administrator privileges.
UAC can block system updates even with elevated privileges, so we often have users disable UAC temporarily during an install. (Would you believe UAC blocks installing a font ?!!)
Also, beware Symantec and McAfee products. Disable them if present.
Murray
|
|
|
|
|
If RadioButton5.Checked = True And RadioButton9.Checked = True Then
Label6.Text = sum + Diabetes.Label3.Text + HDL.Label3.Text + muka1.Label23.Text
Else
Label6.Text = sum + muka1.Label23.Text
End If
* this is my coding that have been highlighted. The problem is it's say label23 is not valid to convert from string to double..actually.i have already declared that label 23 Integer at the muka1. This code is at the muka2, form 2. May i get help here pleasee??
|
|
|
|
|
AFAIK and assuming sum is numeric (probably of type double) rather than string, VB/VB.NET will try and evaluate the + operators as numeric addition, not string concatenation. So either use sum.ToString() or use the & operator for string concatenation.
|
|
|
|
|
I assume "sum" is a double. You are trying to add the .Text property (which is a string) to a double ("sum"). The compiler tries to convert the string to a double, which there is no implicit conversion. You can use double.Parse(muka1.Label23.Text) if you are SURE that Label23 ALWAYS contains a double, otherwise convert it to a double first using the double.TryParse() function.
|
|
|
|
|
OTOH if your intent is numeric addition, then you should explicitly convert the textbox strings to numbers; and beware: an empty string is not a valid number.
|
|
|
|
|
Hi,
This is pankaj vishwakarma a vb.net developer, I am currently working on the printing project.
Here I am creating a custom paper on the printer via code and then trying to print the text on a specified location . It does not
print After trying many time i found that printable area is not changed but it is changing height and width as custom paper still it's printable area remains the same as previous paper
kindly reply
|
|
|
|
|
I'm trying to read the contents of a file into an array, but for some reason the values are showing up in the array as nothing? The contents of the file look like this (the file length is about 5,690 lines long)
AA.CSV
AAAGY.CSV
AABC.CSV
AACB.CSV
This is the section of code I have written to attempt to do this
Dim stocksymbolarrayLong(25000) As String
Dim filecount As Integer
Dim counter As Integer
Dim LongFile As System.IO.StreamReader
LongFile = System.IO.File.OpenText("C:\Users\George Desktop\Documents\Stock System\Stock Programs\Stock Program Data\LongStockTesting.txt")
filecount = 0
Do Until LongFile.Peek = -1
LongFile.ReadLine()
filecount = filecount + 1
Loop
For counter = 0 To (filecount - 1)
stocksymbolarrayLong(counter) = Val(LongFile.ReadLine)
Next
LongFile.Close()
ReDim Preserve stocksymbolarrayLong(filecount - 1)
Array.Sort(stocksymbolarrayLong)
This should be very simple to do and solve, but i've been looking at it for a couple hours and don't know what I'm doing wrong?
Can someone help?
George
|
|
|
|
|
is this VB6 or VB.NET?
how many times can you "read to the end"?
why do you read the file twice? you could extract and store the required data and find out the number of lines in one go (and your problem would suddenly disappear).
if VB.NET, why don't you use a List of Something rather than an array (whose dimension is an implicit limitation to your program)? And are you familiar with File.ReadAllText? File.ReadAllLines?
|
|
|
|
|
Luc, thanks for your prompt reply. Below are my replies to your questions.
I'm using VB.NET
I'm not sure I understand what you mean "read to end"?
I read the file twice. Once to get the length and once to read the data. I'm aware I could do it all at once, but I guess it's just poor form on my part. Not sure how this would make the "problem disappear".
The reason I don't use a list is I'm not familiar with lists and how they work. I am also not familiar with file.readalltext and fileradalllines. I'll look them up.
Please keep in mind I'm not someone who writes a lot of programs and has a lot of experience. I know there are better ways to accomplish what I am looking to do, but I'm curious as to why what I'm doing isn't working?
George
|
|
|
|