|
hi,
I am on version 2
I think this is the same as the array solution
it would look something like
public property Name as string
get
return list(0).Myproperty1
..........etc
I need to relate property Name to Index position 0 in this case.
In my current development I will need about 30 of these clases averaging 20 of these properties per class. The worst class will have 80 or so properties.
I am really looking for something like
public property Name as string
get
return <obj>("Name") 'where <obj> is some classed object
...............
I could use collection but writing back changes is upgly (removing the item then adding it again - yuk)
I could use arrayLists as in return ArrayList.BinarySearch("Name") but I have to keep
the arraylist sorted and am wondering how fast the binarysearch will be compared
to the collection name index. Although knowing microsoft its probably the same code.
and then I am looking for some quick n painless way to actually type in these classes into visual studio.
Thanks
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
Hello
How to get colored area in the center (from the top and all way down) of page. I have tables (centered) on the page. Now I want to get the colored area that covers always the whole page center (10px wider than a table) area but all way down even if the table is on the top part of the page. I am doing a home page with vb.net.
|
|
|
|
|
<table bgcolor="yellow">
........
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
but how to make colored area to go all the way down in the center of the page. If someone use different resolution then the my table is in upper part of page and the coloured area should continue all the way down.
|
|
|
|
|
[
DLLImport("ODBCCP32.dll")
]
private static extern bool SQLConfigDataSource(
IntPtr parent, int request, string driver, string attributes)
this was the code in C#
what is the equivalant in vb.net 2005
|
|
|
|
|
www.pinvoke.net[^] is a good place to find p/invoke signatures. Or there are online sites that convert small snippets between the two languages.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
please give me some code or sample on how to make a button on a datagrid cell. thnx!
|
|
|
|
|
hi,
you can make a button on datagridview very easily at desigen time.
when you add a column to datagridview , change its type to DatagridViewButtonColumn.
if you want to add column at run time then use following code
Dim ColumnButton As New DataGridViewButtonColumn<br />
columnButton.headertext="Your Heading"<br />
DataGridView1.Columns.Add(columnButton)
Hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
i want to know both ways... can you please tell me how could i be able to do that on design time? thank you so much!
|
|
|
|
|
after adding buttonTypecolumn to datagridview ,perform following action
suppose index of buttonTypeColumn is 5 (whether you add column at design time or run time)
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick<br />
If e.ColumnIndex = 5 Then<br />
msgbox "Button Type column of Datagridview is clicked"<br />
endif<br />
<br />
end sub
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
i am using a plain datagrid... and the code is not effective...
Dim ColumnButton As New DataGridViewButtonColumn -- generate an error
ive already change it to Dim ColumnButton As New DataGridButtonColumn but its still not working...
|
|
|
|
|
hello cutequencher,
sorry for misunderstanding. This code is for datagridview
i have no idea about DataGrid. so wait reply from others
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Hai! I need a Help about to Storing datas in Access 2002!
What is the maximum size allowed in Access2002 to store datas?
I have a error when i save records after the database size reaches above 152Mb, through visualBasic Connection! I have 172 tables in my database, and my initial DB size is 19Mb before saving records !
How can i rectify this problem?
It would be really helpful to me if u help to solve this problem!
Guru!
|
|
|
|
|
Howdy,
The physical database file limit for Access XP is 2 gig. What is the specific problem you are running into?
-------------------------------------------
Damian - Insert snappy one-liner here.
|
|
|
|
|
I have a error when i save records after the database size reaches above 152Mb,
I have 172 tables in my database, and my initial DB size is 19Mb!
|
|
|
|
|
What is the error? Is it 'invalid argument?'
______________________
stuff + cats = awesome
|
|
|
|
|
Invalid data Source is the error statement
|
|
|
|
|
OK. You're going to have to show us the code snippet that is throwing this error and the EXACT error message. You replied to lecky and myself and gave two DIFFERENT errors. Which is it and what is it EXACTLY?
|
|
|
|
|
Invalid physical Storage media is the exact error msg!
|
|
|
|
|
What's the ERROR?? Without that, there's nothing we can suggest to help you.
172 tables in an Access database?? I'd serisouly consider moving this up to SQL Server.
|
|
|
|
|
Invalid Storage media is the error msg!
|
|
|
|
|
Hi everyone,
I basically understand the functionality of shared methods, however I would like to ask if shared method could be the cause of the situation that I am facing now.
This is an ASP .Net/VB .Net application. I have a class called DataEntry, here I also have the properties of data entry, and a shared method GetLastDataEntry, which gets the last data entry from the db using the specified where condition, and put it in a DataEntry object and return the object.
Public Shared Function GetLastDataEntry(strCondition as String) as DataEntry<br />
Dim obj as DataEntry<br />
Dim sql as String<br />
<br />
sql = "SELECT * FROM tDataEntry"<br />
If strCondition <> "" Then<br />
sql &= " WHERE " & strCondition<br />
End IF<br />
<br />
sql &= " ORDER BY DateTime DESC"<br />
<br />
' The sql result will be put into obj here.<br />
<br />
return obj<br />
End Function<br />
On a page, I have the following lines of codes:
Dim objDataEntry as DataEntry<br />
<br />
objDataEntry = DataEntry.GetLastDataEntry("Respiration <> 0")<br />
' "Respiration <> 0" is used for the where clause in GetLastDataEntry.<br />
<br />
' Processing for objDataEntry goes here...<br />
<br />
objDataEntry = DataEntry.GetLastDataEntry("Pain <> 0")<br />
' Here, "Pain <> 0" is used for where clause.<br />
<br />
' Processing for objDataEntry goes again...
The above code is correct in syntax. However, when the page is run, typically on more than 1 pc, I will get an sql exception because of the following sql statement:
Incorrect syntax near keyword WHERE. SQL: "SELECT * FROM tDataEntry WHERE Pain <> 0 ORDER BY DateTime DESC WHERE Respiration <> 0 ORDER BY DateTime DESC"
I wonder if the above is because of the shared method, since it is a class method, somehow the previous strCondition that I passed in is still there. But then again, according to the exception caught, Pain comes in first, then Respiration, whereas on the page, Respiration is called first, Pain latter. But then again, not sure if this is caused by the calling from two different PCs.
Please advice if you have any opinion on this. Appreciate!
Cheers!
Yenyen
|
|
|
|
|
where does strCondition come from ? You could be open for SQL injection attacks.
This is a weird problem, that the method is shared should not cause this. Is this the only code that calls this method ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Depending on the application work flow, strCondition is hard-coded.
Yeah, the method is called from other pages too, with different strCondition that suits the requirement of that page.
Another weird thing is the exception does not happen all the time, it is random. And the whole application works fine in development environment, the problem only occurs in the deployment area. In development, my PC is the server, I open the page on my PC, and also in another PC in the LAN. I do not get the exception! urgh...
What could possibly be the cause.. Should I not use shared for the method?
Thanks
Yenyen
|
|
|
|