|
Well, to insert 'more' data, you need to have the form_id, then you need to do an UPDATE statement in your data layer, and call that.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am writing a simple program to arrange data into a spreadsheet. Easy enough. However, when I store mult-selected items from a listbox, wingdings appear after each item.
I have a "for" loop that pulls each item out of the listbox. I need those items stored in a single cell. Each item is independent from one another. Therefore, I used VB's "new line" call, vbCrLf or vbNewLine. When I do this, it puts wingdings at the end of each entry within the cell. I have tried to trim the character off, but that did not work. Any suggestions would be much appreciated. Thanks.
Dizzle
|
|
|
|
|
It's probably a NUL character or the vbCrLf or vbNewLine you're inserting that are appearing as the windings. If you are storing each value separately then there is no need to append any characters - just ensure your data is clean. Posting your code that does this will help our diagnosis.
...Steve
|
|
|
|
|
hi,
What does .net stand for? or What is the .net original name?
Thanks
|
|
|
|
|
.NET means that the thing it is apposed with use the NET framework technology...
.NET Original Name ??? i don't understand your question sir...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
.NET is essentially a marketing ploy. Microsoft wants Java programmers to convert to a Microsoft platform. So they renamed "Visual Studio 7" to "Visual Studio .NET" and they made C# look suspiciously like Java.
|
|
|
|
|
rwestgraham wrote:
...and they made C# look suspiciously like Java.
as they do with most of their products...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
i am writing a small control. my control writes some text to it but i need to write a function so that when the text has been wrote the control resizes to fit the new text could anybody help me with this
Thanks.
Dan
|
|
|
|
|
It all depends on what type of control you are writing your text.lets assume that you are writing your text in a textbox control.
Then you need to keep the width of this control fix and it will have a variable height which will be intialized at run time.
keep the multiline property =false
first see how many characters can fit in a single line of this textbox.
Now increase the height when ever the limit is reached or you need to go to next line.
lets say the textbox can fit 20 chars now if the string length is more than 20 then u need to go to next line.So increase the height of the textbox.
or U can use a list box. where you can make it grow to certain height and then enable the scrollbar so that it doesnt go beyond the form boundary.
hope this helps
Mandar Patankar
Microsoft Certified professional
|
|
|
|
|
|
hi i have a textbox and a datagrid .i want to show records in datagrid when i enter first letter and then second letter of the text and automatically go on it(without press a key)
please help me immediately!!!!!!
|
|
|
|
|
Capture the OnKeyPress event of your textbox and get the current text from your textbox to update your datagrid.
|
|
|
|
|
Hi All,
I have the following code to create an array list
[code]
objConn.Open()
Dim Scores as ArrayList
Dim s as Integer
s=0
Scores=New ArrayList
Dim strSQL4 as String = "SELECT CriteriaID, Score, ScenarioID, UserID As SumScore FROM tblMatrix"
Dim objCmd4 as New OleDbCommand(strSQL4, objConn)
Dim objDR4 as OleDbDataReader
objDR4 = objCmd4.ExecuteReader()
While objDR4.Read()
Scores.add(objDR4("Score"))
s=s+1
End While
'Write Out Contents of Array (Sum of Scores)
For s = 0 To Scores.Count - 1
Response.Write(Scores.Item(s) & " ")
Next
DataBind()
objDR4.Close()
objConn.Close()
[/code]
And a similar one to set up an ArrayList called Conf.
I then have the following code to multiply the values in the arraylists together:
[code]
Dim x as Integer
For s=0 to Scores.Count - 1
x = (Scores.Item(s)) * (Conf.Item(c))
Next
[/code]
But I recieve the following error:
[code]
Index was out of range.
Line: (Conf.Items(c))
[/code]
What is wrong with the code and how do I fix this?
Thanks
DJ
|
|
|
|
|
You have not reinitialized the variable c in the multiplication loop. Only variable s is initialized but you are using two arrays with two different array index variables. Assuming that both arrays are exactly the same size, perhaps you meant to use:
Dim x as Integer
For s=0 to Scores.Count - 1
x = (Scores.Item(s)) * (Conf.Item(<big>s</big>))
Next
...Steve
|
|
|
|
|
Thanks Steve,
That seems to have worked. I am new to this and thought you had to use the same variables as the previous declared arrays.
Thanks again.
DJ
|
|
|
|
|
Anytime DJ. If the arrays are not the same size (or not 1-for-1 correspondence between the members) you'll need to use as many loop variables as required but in this simple case you only need the one loop variable to control access to both arrays. In fact provided the arrays are the same dimension etc... you can control 'n' arrays with only one loop variable.
...Steve
|
|
|
|
|
There is a VC++ dll, which has input parameter like this:
int Func(char * inputpara)
{
...
}
How to pass the parameter to it in VB.net?
The string seems has problem.
Thanks!
|
|
|
|
|
Hi
First when creating your dll, try using the "Create a dll that exports some items" template.
Then you see the sample exported function is declared as:
<br />
int WIN_API Func (...) <br />
{<br />
...<br />
}<br />
WIN_API (the name also contains your project name) is #defined in .h file.
It must be present so that the dll knows what functions to export.
also try adding the __stdcal to the function definition after WIN_API .
Then the functions are accessible from outside the dll.
Also should declare the functions in the .h file.
Then add a .def file that has the exported functions names.
Ask me to describe more if you had problems doing so.
|
|
|
|
|
I am not sure this may help but maybe you need to marshall your data before calling the API. So instead of passing a string, declare your variable as follows:
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=128)> Private inputpara() As Char
|
|
|
|
|
hi i need to save the file name with current system month and year... i also need to give the phy_path to store the file... when i try to run the applcation i get different file name for ex: if i given filename as "checkurl" and run it is saving as "c2eckurl" i dont wht wrong with it here is my code snippet
Dim str As String = "checkurl_"
Dim strfile As DateTime = DateTime.Now
strfilename = strfile.ToString(str + "MMM, yy")
can any body explain me.
regards
cyus
|
|
|
|
|
This is happening due to str + "MMM, yy" (i.e. "checkurl_MMM, yy") being used as a format string to the strfile.ToString() method. The "h" in "ch eckurl_" is being treated as a time formatting character.
Maybe your last line should read:
strfilename = str & strfile.ToString("MMM, yy")
Lookup the help on the DateTime.ToString() method for more details.
...Steve
|
|
|
|
|
thanx for the tip i want to display only month can u guide me
strMonth = strfile.ToString("m")
the above code snippet display month and date i need only month
regards
ybasha
|
|
|
|
|
Hello...
strMonth = strfile.ToString("MMM")
This will return the month in text form to the string strMonth
Tell me if you have any problem
_mubashir
|
|
|
|
|
i already got that thanx for the info....
Regard
ybasha
|
|
|
|
|
hi i need to save the file name with current system month and year... i also need to give the phy_path to store the file... when i try to run the applcation i get different file name for ex: if i given filename as "check" and run it is saving as "c2eck" i dont wht wrong with it here is my code snippet
Dim str As String = "checkurl_"
Dim strfile As DateTime = DateTime.Now
strfilename = strfile.ToString(str + "MMM, yy")
can any body explain me.
regards
cyus
|
|
|
|