|
I recommend this site, and learning C# instead. However, MSDN has heaps of info on both, and so does this site.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi I don't know at what level you are looking for but there is this website that gives you an over view of vb.net. This website gives you a basic idea I am beginner and I tried many websites and books and found this reasonable.
check it out www.startvbdotnet.com.
Good luck
|
|
|
|
|
I have connected up my database but when I preview Dataset in the OLEDataSet Adapter tool in VB, it shows no data and says 0 rows. I know it's connected because it is able to show the table headers.
It's choking on the line: OleDbDataAdapter1.Fill(DataSet11.Pub_Points) with the error: "An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll" (which I suspect is a rather useless message for the purpose of debugging).
DataSet11.Pub_Points is the only option Datasource available in the DataSource property of the control.
________________________________________________________________________
Dave
Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002)
|
|
|
|
|
Hi there can anyone help me please, I can export a 'Dataset' to XML but can anyone tell me how to export a Datagrid please... I use VB.NET
|
|
|
|
|
Considering a DataGrid isn't serializable and doesn't contain any "data", what you want doesn't make any sense. What exactly are you trying to do?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Its ok i worked it out.
Dim DS As System.Data.DataSet<br />
Dim strXMLPath As String<br />
Dim DT As New DataTable<br />
<br />
DT = DataGridView1.DataSource<br />
DS = New System.Data.DataSet<br />
<br />
Try<br />
DS = DT.DataSet<br />
<br />
If Not IO.Directory.Exists("C:\XMLBackup") Then<br />
IO.Directory.CreateDirectory("C:\XMLBackup")<br />
End If<br />
strXMLPath = "C:\XMLBackup\" + Format(Date.Now, "ddMMyyyHHmmss") + ".xml"<br />
DS.WriteXml(strXMLPath)<br />
Catch ex As Exception<br />
<br />
MessageBox.Show(Err.Description)<br />
End Try<br />
|
|
|
|
|
ok re-wording this.
1. this is a web application.
2. there are 2 pages. page1.aspx and page2.aspx
3. I'm using sql server.
I am using 1 table in the server to collect all the data. When the user logs in they are taken to the first page(page1.aspx) here they are asked to input some of the data. The application creates a new record with a unique identifier called form_id. The user inputs the data and is then taken to page2.aspx. Here the user is to update the new record they just created but i can't seem to be able to tell the application to go to the database and retrieve the last record entered.
|
|
|
|
|
i don't understand at all dude, you really need to explicit your question more than this, and use more context word. what is a page ? what do you try to do ? what is the relation with the database and your program ? what database do you use ? etc...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
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!
|
|
|
|