|
We are using an ASPX file to create a webform. We are creating an interface to generate a graph. This interface has a timescale with a drop down list of annually, quarterly, and monthly. It also has a time period listbox where one to many years can be selected from 1995 to 2003. There is also a choice of indicator that the figures are based on say for instance hospital admissions of respiratory disease. These indicators are drawn from a database. As well as this there is a listbox of geographical divisions for each type of organisation. These organisations are District Health boards, Regional Councils, and Territorial local Authorities. Only one type of organisation can be picked but out of each type one to many say regional councils can be selected. These lists are connected to a database . Then there is a button titled Graph the data which is to graph the data. Line graphs and bar graphs are wanted. All figures to create the graph are from a database. They are drawn from the an Microsoft Access database. Is there a way to do this through ASPX? If not what VB.net code would we have to write? We have a deadline coming soon. Any feedback would be greatly appreciated.
|
|
|
|
|
I want to lock the Access database in my project (VB.6) . but i don't know anything about this . please help me .
|
|
|
|
|
shoma bayad baraye in kar az access estefade konid.
dar access ha dar menue toos bayad security ro entekhab konid. vali dao in no' bank ra nemishnasad va bayad az ado va az getengine 4 estefade konid!!!!
M.Khayatan
MkhProgrammer
|
|
|
|
|
Is there a way to return the file pointer back to the beginning of the line you are currently reading? For instance, if you're reading a text file char by char using the Read method, then you want to back up to the beginning of that line, is there a way to do that?
Or how about answering this stupid question: Is there a way to read in a set of characters from a file and stop once you hit a delimiter (i.e. a space)?
|
|
|
|
|
I guess Split might helps you...
Is it?
Regards,
NetPointer
|
|
|
|
|
I have a simple VB.net app that connects to an access Database.
The database has one table ("Chums").
In that table there are 2 columns("Name" & "Sound")
There are three records:
1 "Steve" & "Hello.wav"
2 "Fred" & "Goodbye.wav"
3 "Dave" & "Seeya.wav"
I want to be able to track the user's movement through the grid, and play the corresponding sound based on the selected record. The sound playing I have a handle on - can someone help me with a code snippet to navigate a DataGrid?
Thanks.
Steve
|
|
|
|
|
I know VB doubles are 4bits while VC doubles are 8. I'm passing a double from vb to a vc dll, how do I convert the data back and forth?
|
|
|
|
|
I don't know where you saw that VB doubles are 4 bit but they're not. They're exactly the same as VC doubles...
From MSDN Visual Basic reference:
Double data type
A data type that holds double-precision floating-point numbers as 64-bit numbers in the range -1.79769313486231E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values. The number sign (#) type-declaration character represents the Double in Visual Basic.
look up "type conversion functions"
Beware the chickens, for in their silence, they plot...
Two fish are in a tank. One says to the other: "I'll man the guns, you drive!"
Life is too short to be taken seriously.
-- Oscar Wilde
|
|
|
|
|
From what I understand the structure byte alignments for vb vs vc are 4 bytes and 8 bytes respectively. VB dynamically decides the byte alignment which is usually 4 but it can change it to optimize class structures.
The reason I'm asking this is I'm passing a structure with a double array inside it from VB to a VC dll. When I change the value of the double array inside the dll, it doesn't change the vb value. I'm passing by reference.
Here is my vb code:
<br />
Public Type assetvar<br />
cutoff_prin_bal(400) As Double<br />
End Type<br />
<br />
Public Type collateralvar<br />
subissue(100) As Integer<br />
asset As assetvar<br />
End Type<br />
<br />
Public Declare Function test Lib "PSAEngine.dll" Alias "_test@8" _<br />
(ByVal j As Integer, ByRef collateral As collateralvar) As Double<br />
The vc dll is:
<br />
struct assetvar<br />
{<br />
double cutoff_prin_bal[400];<br />
};<br />
<br />
struct collateralvar<br />
{<br />
int subissue[100];<br />
struct assetvar asset;<br />
};<br />
<br />
__declspec( dllexport ) double test(int j, struct collateralvar *collateral);<br />
Here is what I am doing inside the dll function:
<br />
__declspec( dllexport ) double test(int j, struct collateralvar *collateral)<br />
{<br />
collateral->asset.cutoff_prin_bal[j]=14;<br />
<br />
return(1);<br />
}<br />
from VB I'm calling the dll this way:
<br />
dim x as double<br />
collateral.asset.cutoff_prin_bal(0) = 423149.74<br />
x = test(0, collateral)<br />
I still get 423149.74 instead of 14.0. Therefore they are not the same thing.
|
|
|
|
|
OK I see what you're trying to do but I haven't done VC in so long I've forgotten most of it . I'm sure there's something I'm missing but I can't put my finger on it... Sorry.
Beware the chickens, for in their silence, they plot...
Two fish are in a tank. One says to the other: "I'll man the guns, you drive!"
Life is too short to be taken seriously.
-- Oscar Wilde
|
|
|
|
|
Codeproject once had a posting of a tool that converted projects between the two versions of Visual Studio. I've look all over and cant find it. Can anyone point me in the direction of the converter..?
Appreciate it. thanks
|
|
|
|
|
Hello,
I've problem with the sqlDataAdapter.DeleteCommand. When I Insert or Update data there are no problem.. but when I delete data, there is no error but nothing happend in the database..
Here is the code..
'select no problem
cmdSelect = Database.CreateCommand("cContact_SelectAllByVehicle")
cmdSelect.CommandType = CommandType.StoredProcedure
cmdSelect.Parameters.Add("@ID_Vehicle", 1)
sqlDaClient.SelectCommand = cmdSelect
'delete dosent'work
cmdDelete = Database.CreateCommand("delete from cContact WHERE ID_Contact = @ID_Contact and ID_Vehicle = @ID_Vehicle")
cmdDelete.CommandType = CommandType.Text
cmdDelete.Parameters.Add(New SqlParameter("@ID_Contact", SqlDbType.Decimal, 0, "ID_Contact"))
cmdDelete.Parameters.Add(New SqlParameter("@ID_Vehicle", 1))
sqlDaClient.DeleteCommand = cmdDelete
'insert no problem
cmdInsert = Database.CreateCommand("insert into cContact(ID_Vehicle, ID_Contact, Rate) values(@ID_Vehicle, @ID_Contact, @Rate)")
cmdInsert.CommandType = CommandType.Text
cmdInsert.Parameters.Add(New SqlParameter("@ID_Vehicle", 1))
cmdInsert.Parameters.Add(New SqlParameter("@ID_Contact", SqlDbType.Decimal, 0, "ID_Contact"))
cmdInsert.Parameters.Add(New SqlParameter("@Rate", SqlDbType.Float, 0, "Rate"))
sqlDaClient.InsertCommand = cmdInsert
'update no problem
cmdUpdate = Database.CreateCommand("UPDATE cContact SET Rate = @Rate WHERE ID_Contact = @ID_Contact and ID_Vehicle = @ID_Vehicle")
cmdUpdate.CommandType = CommandType.Text
cmdUpdate.Parameters.Add(New SqlParameter("@ID_Contact", SqlDbType.Decimal, 0, "ID_Contact"))
cmdUpdate.Parameters.Add(New SqlParameter("@ID_Vehicle", 1))
cmdUpdate.Parameters.Add(New SqlParameter("@Rate", SqlDbType.Decimal, 0, "Rate"))
sqlDaClient.UpdateCommand = cmdUpdate
sqlDaClient.Fill(dtClient)
dtClient.Rows.RemoveAt(0)
sqlDaClient.Update(dtClient)
I really need some help.. thanks..
Julien
|
|
|
|
|
An unhandled exception of type 'Sytem.OutOfMemoryException' occured in System.Windows.dll
Additional information: Error creating window handle.
--- what does this mean? how i came up with this when all my code did was "form1.show"
|
|
|
|
|
Are you doing anything in the load/paint event of the Form?
Cheers,
Simon
sig :: "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG picture :: my first abstract photo
|
|
|
|
|
alryt, this is an MDI application...
the parent form calls the child form in the event menuItem_click w/c goes like this : childFrom.show
in the load event of the childForm, i have this code :
Me.StringForToolbar = "10000000100" , w/c is used by parent form to setup the tool bar. but even though i remove this, same thing happens.
... i never used the Paint event of my forms.
|
|
|
|
|
oh, ive found out the cause in the event of the parent form OnMDIChildActivate. here's the code:
'Reset tool bar of parent using the stringFortoolbar of child
'This event is still being called when the form is being closed using the control menu
If Me.ActiveMdiChild Is Nothing Then Exit Sub
Dim objName As String
objName = MyBase.ActiveMdiChild.GetType.Name()
If objName = "ReceivingOrders" Then
Me.ResetToolbar(RRChild.StringForToolbar)
ElseIf objName = "MaterialIssuance" Then
Me.ResetToolbar(MISChild.StringForToolbar)
ElseIf objName = "TransferToAccounting" Then
Me.ResetToolbar(TransferAcctChild.StringForToolbar)
End If
... if i remove this, no error will occur.. pls. give me an alternative strategy for this. refer to the comments... and when shall i use the events OnMDIChildActivate and OnMdiChildActivate? tnx very much.
|
|
|
|
|
I'm getting the error bad dll calling convention when I call my dll written in vc++ from my vb app. The problem is because of the type / structure I'm passing my dll.
In vb, I've defined my call to the dll and created a type in vb that looks like this:
<br />
Declare Function test Lib "C:\TEMP\EngineTest\PSAEngine.dll" Alias "_test@10004" _<br />
(ByVal j As Integer, ByRef collateral As collateralvar)<br />
<br />
<br />
Type assetvar<br />
cutoff_prin_bal(400) As Double<br />
orig_gross_rate(400) As Double<br />
orig_amort_term(400) As Double<br />
End Type<br />
<br />
Type collateralvar<br />
subissue(100) As Integer<br />
asset As assetvar<br />
End Type<br />
In my VC++ dll, I've defined my function and structure as:
<br />
extern "C"<br />
{<br />
__declspec( dllexport ) void test(int j, collateralvar collateral);<br />
}<br />
<br />
struct assetvar<br />
{<br />
double cutoff_prin_bal[400];<br />
double orig_gross_rate[400];<br />
double orig_amort_term[400];<br />
};<br />
<br />
struct collateralvar<br />
{<br />
int subissue[100];<br />
struct assetvar asset;<br />
};<br />
Here is my call to the dll function:
<br />
Static collateral As collateralvar<br />
.<br />
.<br />
.<br />
test 0, collateral<br />
When I call the function test in my vb program it returns the error Bad DLL calling convention. Any ideas?
|
|
|
|
|
use __stdcall in the function you declare in c++ to solve the calling convention problem
|
|
|
|
|
<br />
void __stdcall test(int j, collateralvar collateral); <br />
This doesn't work because your back to not being able to find DLL entry point.
It must be declared as
<br />
__declspec( dllexport ) void test(int j, collateralvar collateral);<br />
|
|
|
|
|
OK. I've gotten into the vc dll. I added a struct command and made it a pointer.
vc dll
<br />
__declspec( dllexport ) double test(int j, struct collateralvar *collateral)<br />
vb declare
<br />
Public Declare Function test Lib "PSAEngine.dll" Alias "_test@8" _<br />
(ByVal j As Integer, ByRef collateral As collateralvar) As Double<br />
Now my problem is changing the values inside the dll's collateralvar struct and having vb see them. I'm passing the structure by reference so it should work but its not. Here is what I am doing inside the dll function:
<br />
__declspec( dllexport ) double test(int j, struct collateralvar *collateral)<br />
{<br />
collateral->asset.cutoff_prin_bal[j]=14;<br />
<br />
return(1);<br />
}<br />
from VB I'm calling the dll this way:
<br />
dim x as double<br />
collateral.asset.cutoff_prin_bal(0) = 423149.74<br />
x = test(0, collateral)<br />
I still get 423149.74 instead of 14.0
|
|
|
|
|
Hello,
I have zero to little experience with Visual Basic but have a greater amount of experience programming with Visual C++ and other languages and I have a few questions.
1. Would it be a waste of time for me to learn VB 6.0? Should I instead go directly to learn VB .NET?
2. Can anyone suggest any good books for me to read? (Preferably books for beginners to VB).
Thanx for the help,
-Flack
|
|
|
|
|
If you HAVE to learn VB I would move to VB.NET. If you have a choice and already have a more C++ oriented background go to C# instead.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
I agree.
Go for C# or MC++ (Managed Extension for C++) if your project requirement is not forcing you to go for VB.NET.
anyway..
Professional C# for Wrox is one of the good book I have gone thru.
HTH,
Regards,
NetPointer
|
|
|
|
|
Now wait a second there... (I hate it when I am misunderstood)
What I said was if you have to learn a .NET based language for a project and already have a good C++ background then C# will probably suit you better.
I could haev conversly said that if you have to learn a .NET based language for a project and you have a good VB6 background then VB.NET would be best suited to learn.
Sheesh...
You almost made it sound like I was recomending C# over VB there.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Hi,
I am developing a desktop application using VB.Net and using MS Access as
the database. However some of users do not have MS Access installed in their
computer. How can I deploy the application to those users without Access
installed in their PC? Do they have to install at least Access RunTime?
I wolud appreciate if any one can give me some idea.
Many thanks
Zengfu
|
|
|
|