|
Hi,
I have created a dataset and made changes to it....in a for loop
now that dataset has to be updated to the database...
Ramesh Sambari
|
|
|
|
|
Look at point seven of this link. It's in C#, but you can easily run it through an online converter to get bona fide VB.Net code. Additionally, you could look at this, this and this link
|
|
|
|
|
You must use an Update Statement of the Adapter
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
hi all,
i am very confused about the relation between Font and character set.
can any body provide some information(or useful link) which can describe the relation between Font and character set.
Actually i want to know that what is role of Font for any character set?
|
|
|
|
|
A character set is a collection of characters which can be used by a particular character encoding, such as ASCII or UTF-8. A font is a complete character set of a single size of a particular typeface
|
|
|
|
|
Computafreak wrote: A font is a complete character set of a single size of a particular typeface
can you explain little more this thing. and what is the typeface
|
|
|
|
|
sunil goyalG wrote: what is the typeface
What the characters look like, usually implementing a common style between all character images.
|
|
|
|
|
Character Set is a set of characters. Meaning, a set of characters grouped by meaning, function, or other needs. A character set is defined by committe.
A Font (font set) displays a set of characters. The characters can be from one or more "Character Sets". For instance, the font Arial has 24 character sets. A font is created by an individual.
A character can be displayed (or presented) in different ways.
Therefore, we have multiple font sets or Fonts.
Run charmap or select Start>Programs>Accessories>System Tools>Character Map, the "Character Map" application.
Play with the different fonts.
Notice when a clear- or true-type font is selected, the "Character Set" is highlighted.
Play with the different character sets.
Try Arial font with the two character sets "Windows: Western" and "Windows: Arabic".
http://en.wikipedia.org/wiki/Character_encoding[^]
http://www.microsoft.com/typography/AboutFontsOverview.mspx[^]
|
|
|
|
|
Andy Missico wrote: A Font (font set) displays a set of characters. The characters can be from one or more "Character Sets". For instance, the font Arial has 24 character sets
whether you mean Arial supprort 24 type of character set like unicode,ascii etc? if yes then how can i find that which font support which type of character set(for example how many character set is supported by Font "Courier New")
|
|
|
|
|
Yes, but I do not know the specific answer. I do know the "character set" drop-down list of the "Character Map" application will give you a list of character sets the font supports. Except the first item "Unicode". Think of this item as "show me all characters in any character set".
|
|
|
|
|
Hi
I have the following line in my vbscript
set dllreg = "wscript.shell"
dllreg.run "regsvr32 /u C:\Program Files (x86)\histori.dll"
it is coming out saying
"Loadlibrary C:program" failed
how to give c:\program files (x86) for that.
Also i want it to run silently. How to do that?
Please do let me know
|
|
|
|
|
regsvr32 /?
regsvr32 /s /u "C:\Program Files (x86)\histori.dll"
Therefore, you are missing the quote delimiters from the path.
dllreg.run "regsvr32 /u ""C:\Program Files (x86)\histori.dll"""
|
|
|
|
|
You need to enclose the path in quotes. VBScript needs these to be escaped properly as double quotes. So the final line would be
dllreg.run "regsvr32 /u ""C:\Program Files (x86)\histori.dll"""
Either way, I'm surprised that setting dllreg to a string worked. Normally CreateObject is used
|
|
|
|
|
Hi,
I wrote code as
Public Function UploadData(ByVal UDs As DataSet) As Long
Dim SkipRecCnt As Long = 0
For i As Integer = 0 To UDs.Tables(0).Rows.Count - 1
Try
SQLCmd.CommandText = UDs.Tables(0).Rows(i)(0).ToString()
SQLCmd.ExecuteNonQuery()
UDs.Tables(0).Rows(i)(1) = "1"
UDs.AcceptChanges()
Dim builder As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(AccDa)
builder.GetUpdateCommand()
AccDa.Update(UDs)
Catch ex As Exception
SkipRecCnt = SkipRecCnt + 1
End Try
Next
At line builder.GetUpdateCommand() it is giving following error
Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
Please help me out.
|
|
|
|
|
You gave the CommandText property the value of a cell in a table instead of giving it a legal SQL query, that also, BTW, returns the primary key column of the table your SELECT statement is querying. The SqlCommandBuilder won't work with a query that returns data from multiple tables, nor will it work with a table that has no primary key.
|
|
|
|
|
I have two forms in my application.On form1 there is datagridview -dg1 which is filled with a dataset-ds1.
On form2 I have a some code ,which after fulfilling certain conditions updates the database table which is contained in ds1.
When this is done I want to refresh datagridview-dg1 and show the updated table.
Both the forms are already open and I have to update them.
Form2
Public Event refreshdg1(ByVal st As String)
Private Sub
.......Some condition -->True then
....... Update database table
'I tried three ways here
1- Raiseevent refreshdg1(s1)
2-
Dim StrCon As String
Dim conn As SqlConnection
StrCon = ConfigurationManager.AppSettings("StrCon")
conn = New SqlConnection(StrCon)
conn.Open()
Dim ds As New SqlDataAdapter("Select * from Tag_History where Tag_ID = '" + s1 + "' ", conn)
Dim commandBuilder As New SqlCommandBuilder(listadapter)
Dim table As New DataTable()
table.Locale = System.Globalization.CultureInfo.InvariantCulture
listadapter.Fill(table)
Form1.dg1.DataSource = table
conn.Close()
3- Form1.refreshdg(s1)
End sub
Form1:
Addhandler Form2.(I cant refreshdg1 here)
Private Sub refreshdg(ByVal s As String)
Dim f As New Parking_control
AddHandler f.refreshdg1, AddressOf refreshdg
Dim StrCon As String
Dim conn As SqlConnection
StrCon = ConfigurationManager.AppSettings("StrCon")
conn = New SqlConnection(StrCon)
conn.Open()
Dim person As String
person = s
Dim ds1 As New SqlDataAdapter("Select * from Tag_History where Name = '" + person + "' ", conn)
Dim commandBuilder As New SqlCommandBuilder(ds1)
Dim table As New DataTable()
table.Locale = System.Globalization.CultureInfo.InvariantCulture
listadapter1.Fill(table)
table.Columns(0).ColumnName = "Tag ID"
table.Columns(1).ColumnName = "Date Time"
table.Columns(3).ColumnName = "Tag Status"
dg1.DataSource = table
conn.Close()
End Sub
|
|
|
|
|
You can use Eventheandler for Refresing DataGrid.
If you can think then I Can.
|
|
|
|
|
how..what do you mean..haven't i used that already?
|
|
|
|
|
He means set up a delegate that is called in form2 and is hooked to a method in form1
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Wow - what horrible code. Also, depending on where 's' comes from, odds are good that I could erase your database just by using the search functionality.
The answer to your original question is delegates, but I'd say you have a long way to go in general before you can write code anyone would want to run, let alone pay for.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Why are you being rude? Please remove your comment.
|
|
|
|
|
This is a case where you do not need an event. Events are good when one or more objects need to react to another object's behavior. Here one form is telling the other form to update. Therefore, you just need a simple method call. Event handling just complicates the communication between the two forms (objects).
Remove all event handling code, such as the Public Event , AddHandler , and RaiseEvent statements. Just call Form1.refreshdg(s1) as you did in Item #3.
I usually use RefreshUI as the standard entry point for my forms. If needed, I will add RefreshData , RefreshButtonState , and so on.
|
|
|
|
|
|
dear all
i would like to create an application: i wanna use 2 options buttons to control 2 frames, when i click option1, the frame1 will be activitaed, otherwise frame2 will be activitated. thanks a lot
how to control by 2 options' button. thanks
|
|
|
|
|
You have to be a bit more specific.
What kind of application is it? Is it a windows form application or a web application? What do you mean with a "options button"? What kind of frames are you talking about, and what should happen when they are activated?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|