|
What is the difference between typed and untyped data sets?
Which one is better to use?
I think I should use typed datasets. Am I right.
|
|
|
|
|
AAGTHosting wrote: What is the difference between typed and untyped data sets?
Read[^]
|
|
|
|
|
Yup , can anyone elaborate the difference between TYPED and UNTYPED DAtasets?
ADVANTAGES and DIsADVANTAGES
any working example of how they work?
:- Rashid Ali -:
|
|
|
|
|
I have been using Visual Basic.Net 2003 to develop a program. I switched to using Visual Basic 2005 Express. I set up a data adapter in 2003 and when I converted the program to 2005 the data adapter did not work. Then I deleted the data adpater and when I tried to find a data adapter I could not find one?
Do we use data adapters in Visual Basic 2005?
What is the difference between connecting to a database, setting up a data adapter and data set between VB 2003 and VB 2005.
When I created a data set in VB 2005 I noticed a file named dataSet1.vb that had a class named dataset1 in it. I don't think that VB 2003 created a dataSet class.
Does anyone know where there is a document describing how to set up a data adpater and data set in 2005?
|
|
|
|
|
AAGTHosting wrote: What is the difference between connecting to a database, setting up a data adapter and data set between VB 2003 and VB 2005
It's no different, in code. If you're using the designers to do it, the 2005 designers do things a bit differently than 2003, favoring the use of the newer TableAdpater class.
Personally, I just about never use the designers to do my database work. I code my Data layers almost entirely by hand.
Seriously, if you want to learn how to fix problems like this, you MUST know how the controls and classes work in your code and not let the designers generate the "magical code" for you.
Dim conn As String = "...connection string..."
Dim comm As String = "SELECT field, field, field FROM table WHERE expression"
Dim da As New SqlDataAdapter(comm, conn)
Dim cb As New SqlCommandBuilder(da)
Dim dt As New DataTable
da.Fill(dt)
|
|
|
|
|
What is the purpose of the data Set class that gets generated when you create a data set?
Also, how do I create a data adapter? Does the data adapter get created automatically when creating a data set.
Do you normally only create one data set in a program or do you create multiple data sets?
Now, I do have several different tables. I have login tables, teachers tables and student tables.
|
|
|
|
|
How to import a MFC/C++ DLL into VB.NET 2005?
Network Development Kit 2.0
http://www.codeproject.com/internet/ndk.asp
I want to use this dll..
|
|
|
|
|
You can do this using P/Invoke. Click[^]
|
|
|
|
|
Hi,
I have a excel sheet, in that the fields are:
Name,EmployeeID,Address,Email.
Sourabh,757,New Bombay,something@something.com
I have a C1.Win.FlexGrid in which I have put the same columns in this grid with one more colum in the starting as Select(Boolean).
This is the code that I have written.....
<br />
Dim ofd As New OpenFileDialog<br />
Dim dgtemp As C1.Win.C1FlexGrid.C1FlexGrid<br />
Dim fn As String = ""<br />
Dim sheetname() As String<br />
<br />
ofd.AddExtension = True<br />
ofd.DefaultExt = ".xls"<br />
ofd.Filter = "Microsoft Excel Workbook(*.xls)|*.xls"<br />
ofd.ShowDialog()<br />
fn = ofd.FileName<br />
txtFile.Text = fn<br />
dgtemp = New C1.Win.C1FlexGrid.C1FlexGrid<br />
<br />
sheetname = dgtemp.LoadExcelSheetNames(fn)<br />
dgtemp.LoadExcel(fn, sheetname(0), C1.Win.C1FlexGrid.FileFlags.IncludeFixedCells)<br />
Thje bold part of the code is giving error as:
"Failed to open storage file."
Help...
Thanks and Regards,
|
|
|
|
|
You're going to have to go to ComponentOne's site for support[^] on this. It's functionality specific to their control.
|
|
|
|
|
Hello,
I have checked out the code at my end. It seems to be working fine. If the issue persists, I
would suggest you to contact at the following email addresses for further assistance.
support@componentone.com
Regards,
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Hi,
That is solved, another problem now.
Eg: I have a flexgrid with two columns(Select as boolean and Name as string) in which in the column of name I already have my name, now if i again upload a excelfile which has my name, in the datagrid my name should come checked.
How do I do that. The thing which I have already done is as below:
It will take some time for you to read this, but please read as I am stuck in a quick sand.
Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.Click<br />
Dim filename As String<br />
Dim od As New OpenFileDialog<br />
Dim SheetName() As String<br />
Try<br />
<br />
od.AddExtension = True<br />
od.DefaultExt = ".xls"<br />
od.Filter = "Microsoft Excel Workbook(*.xls)|*.xls"<br />
od.ShowDialog()<br />
filename = od.FileName<br />
SheetName = dgtmp.LoadExcelSheetNames(filename)<br />
dgtmp.LoadExcel(filename, SheetName(0), C1.Win.C1FlexGrid.FileFlags.IncludeFixedCells)<br />
<br />
Dim dgCol As C1.Win.C1FlexGrid.Column<br />
For Each dgCol In dgtmp.Cols<br />
dgCol.Name = dgtmp.Rows(0)(dgCol.Index)<br />
Next<br />
<br />
dgtmp.Cols.Add()<br />
dgtmp.Cols(dgtmp.Cols.Count - 1).Name = "SEL"<br />
dgtmp.Cols(dgtmp.Cols.Count - 1).DataType = System.Type.GetType("System.Boolean")<br />
<br />
objEms.RetrieveSearchData("FIS104", "BANK_CODE='" & BankCode & "'", "", sCompany, sPlant, dsRet, Nothing)<br />
If Not IsNothing(dsRet.Tables(0)) Then<br />
If dsRet.Tables(0).Rows.Count > 0 Then<br />
CLEARDATE = dsRet.Tables(0).Rows(0)("CLEAR_DATE")<br />
WITHDRAWLS = dsRet.Tables(0).Rows(0)("WITHDRAWLS")<br />
DEPOSITS = dsRet.Tables(0).Rows(0)("DEPOSITS")<br />
CHEQUENO = dsRet.Tables(0).Rows(0)("CHEQUE_NO")<br />
DESCRIPTION = dsRet.Tables(0).Rows(0)("DESCRIPTION")<br />
Else<br />
ShowMessage("Format not Defined", 30)<br />
End If<br />
End If<br />
<br />
Dim dgRow As C1.Win.C1FlexGrid.Row<br />
For Each dgRow In dgtmp.Rows<br />
'If dgRow.Index > 0 Then<br />
If dgtmp.Rows.Count - 1 > 0 Then<br />
With dgBankReco<br />
<big>Dim curRow As Integer = .FindRow(dgRow(CHEQUENO), 0, .Cols("CHEQUE_NO").Index, False, True, False)</big><br />
If Val(.Rows(curRow)("DEBIT").ToString()) = Val(IIf(IsNothing(dgRow(DEPOSITS)), 0, dgRow(DEPOSITS))) And Val(.Rows(curRow)("CREDIT").ToString()) = Val(IIf(IsNothing(dgRow(WITHDRAWLS)), 0, dgRow(WITHDRAWLS))) Then<br />
.Rows(curRow)("SEL") = 1<br />
.Rows(curRow)("CLEAR_DATE") = dgRow(CLEARDATE)<br />
dgRow("SEL") = 1<br />
End If<br />
End With<br />
Else<br />
dgtmp.Row = 0<br />
dgtmp.Rows.Fixed = 1<br />
End If<br />
Next<br />
<br />
<br />
Catch ex As Exception<br />
dsRet = Nothing<br />
End Try<br />
End Sub
The code in bold throws an exception as :
"Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index"
-- modified at 7:08 Thursday 22nd November, 2007
Thanks and Regards,
|
|
|
|
|
Using a propertygrid control i show my object properties to set and get.
Using attribute properties like i show below, i can control Category, Description, even particular selection mode using TypeConverter() attribute.
<<DescriptionAttribute("Set if mailing is enabled"), _<br />
CategoryAttribute("Mailing")<br />
GetType(ComboProperty)>> _<br />
Public Property IntercambioIn()<br />
...
I need to read a password string, and i can't show password chars like '*'.
Does exist any attribute to show the setting using password char ('*').
Regards
|
|
|
|
|
You can't do it in properties alone. You'd have to create your own custom property editor[^].
Scratch that. You CAN do it with a property. Look up the PasswordPropertyTextAttribute class.
<PasswordPropertyText(True)> _
Public Property Password() As String
Get
Return _password
End Get
...
End Property
|
|
|
|
|
GoodMoring
I have a printdocument
If I want to draw a line that goes from left to right margin of the paper as I do?
Tks (Fulvio)
Fulvio
|
|
|
|
|
The same way you'd draw a line on a controls surface, using the Graphics object you get in the PrintPage event of the PrintDocument. If you want the framework for an example, lookup the PrintDocument class.
|
|
|
|
|
Hi! i am developing an application that will search for a within the document(PDF,Word,xml,etc), so basically its text search,you find anything which matches the name provided within a document
|
|
|
|
|
Have a look at this article[^].
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Is there a question?
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hello
Can anybody help me how to set ActiveViewIndex in Wizard control?
I am getting this error while binding the wizard dynamically..
ActiveViewIndex is being set to '2'. It must be smaller than the current number of View controls '2'. For dynamically added views, make sure they are added before or in Page_PreInit event.
Parameter name: value
Thank in advance
kokila
|
|
|
|
|
The answer is in the error message. You're trying to set the value of ActiveViewIndex to 2 when there are two items in its collection, numbered index 0 and index 1. Try setting it to 1 instead.
|
|
|
|
|
I wrongly placed the code in page load. it should be in MyWizard.Init.
Now its working.
Thank you.
kokila B
|
|
|
|
|
How can I change the format style of a column in a DatagridView so that I can enter the values in the given format. I want to set the format of a column of a datagirdview to a phone Number style(123-456-7890) i.e., ###-###-####. So that when I am entering data to it, it should automatically add the hyphen(-)after the 3rd and the 6th digit of the entered data,just like in a MaskEditBox control.
Could anybody please help ?
Thanks in Advance.
Sekhar
|
|
|
|
|
You cannot supply a format style to do this. You'd have to implement your own DataGridViewColumn to provide this functionality. Also, your other problem is localization. Not every country has the same phone number format.
Google results[^] for "vb.net custom datagridviewcolumn".
"vb.net Masked datagridviewcolumn"[^]
|
|
|
|
|
This question belongs in the ASP.NET Forum.
|
|
|
|