|
Hi steve...
Try using MAcros!! May be it cud help u!
|
|
|
|
|
Hi
i have a C# 2005 and oracle 9i database
i was install client component for the .NET from oracle 9i
but when i try to run the program he give me an error message "Need Client Component version x.x.x" where x is some number i do not remember it then
i was install client component for the .NET from oracle 10g
but he give me an error message "Can not Resolove TNS name" ?
how i can solve this problem ?????
|
|
|
|
|
Do you have an entry for the database you are trying to connect to in the tnsnames.ora file?
Mike Lasseter
|
|
|
|
|
what i must write on the tnsnames.ora file ?
|
|
|
|
|
How Can I get my web pages in center of a browser
|
|
|
|
|
Not sure how thi is a VB.NET question, but you can use CSS to align your content so it is centred.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Place the content of your webpage inside a table and centre the table.
For example :-
<table width="600" align="center" border="0" cellspacing="0" cellpadding="0"><br />
<tr><br />
<td><br />
Your content here<br />
</td><br />
</tr><br />
</table><br />
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'
|
|
|
|
|
I have a program that will search directories and add files to a listbox by the extension you enter. I have a table created in access that contains files. The program will check the database to see if files exist. I have it where if the path in tblExclude is equal to the path textbox1 then add files to listbox 2 and all other files are added to listbox1. My problem is I don't want the files that are added to listbox2 to be added to textbox1. The files that are in tblExclude are being added to both listboxes instead of just listbox2. Can someone please help me with this? Here is my code:
'Get the entered file paths and patterns<br />
Dim enteredFilePaths As String() = TextBox1.Text.Split(New String() {";"}, StringSplitOptions.RemoveEmptyEntries)<br />
Dim patterns As String() = TextBox2.Text.Split(New String() {";"}, StringSplitOptions.RemoveEmptyEntries)<br />
<br />
'Declare a string array to store the file paths that are not found in the database<br />
Dim filePaths() As String = Nothing<br />
Dim dv As DataView = dt.DefaultView<br />
dv.Sort = "ExcludePath ASC"<br />
<br />
For Each path As String In enteredFilePaths<br />
<br />
'Check to make sure the file path does not have "\" as it's last character.<br />
If path.LastIndexOf("\") = path.Length - 1 Then<br />
path = path.Substring(0, path.Length - 1)<br />
End If<br />
<br />
Dim rows As DataRowView() = dv.FindRows(path)<br />
<br />
If rows.Length > 0 Then<br />
<br />
'Only add the file if it is one of the entered extensions.<br />
For Each row As DataRowView In rows<br />
If ListBox2.Items.Contains(row.Item("ExcludeFileName")) Then<br />
<br />
End If<br />
<br />
Dim ext As String = System.IO.Path.GetExtension(row.Item("ExcludeFileName").ToString).Replace(".", "")<br />
If Me.TextBox2.Text.IndexOf(ext, 0, StringComparison.CurrentCultureIgnoreCase) > -1 Then<br />
<br />
'It was found in the database, display it in the listbox.<br />
Me.ListBox2.Items.Add(row.Item("ExcludeFileName"))<br />
End If<br />
Next<br />
Else<br />
'It was not found in the database<br />
Dim i2 As Integer = 0<br />
If Not filePaths Is Nothing Then<br />
i2 = UBound(filePaths) + 1<br />
End If<br />
<br />
'Resize the array<br />
ReDim filePaths(i2)<br />
<br />
'Add the path to the array<br />
filePaths(i2) = path<br />
End If<br />
<br />
Next<br />
GetDirectoryContents(enteredFilePaths, patterns)<br />
<br />
End Sub<br />
<br />
Private Sub GetDirectoryContents(ByVal dirs() As String, ByVal patterns() As String)<br />
'Declare variable.<br />
Dim dDir As DirectoryInfo<br />
<br />
'Search directory for files and add to the listbox.<br />
For Each sDir As String In dirs<br />
If Not Directory.Exists(sDir) Then Continue For<br />
dDir = New DirectoryInfo(sDir)<br />
For Each ext As String In patterns<br />
For Each fi As FileInfo In dDir.GetFileSystemInfos("*." & ext)<br />
ListBox1.Items.Add(fi.Name)<br />
Next<br />
Next<br />
Next<br />
End Sub
jds1207
|
|
|
|
|
Hi,
The first thing that comes to mind is that, in this code, you first create and fill an array with files that you want to exclude, fill Listbox2 with the values from that array, and then at the end you fill Listbox1 with files obtained in a completely different way.
jds1207 wrote:
'Only add the file if it is one of the entered extensions.
For Each row As DataRowView In rows
If ListBox2.Items.Contains(row.Item("ExcludeFileName")) Then
End If
It looks like you forgot to add a bit of code here, but you could use this same bit to compare each fi.Name with your exclusion list before you add it to ListBox1.
Hope it helps,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi everybody,
I am building a SAPI C&C app in vb.net, and i would like to make "Sub-commands"
as in: "File (open, close, save, save as.. etc'..)"
so i would like to make the word "File" as an ID an then the option to say and activate one of the 4 sub commands as in the example.. I belive this is called "Chilldren" is it?
my Question is: What elements of code should i use to crate this..
i can't understand from the SAPI SDK 5.1 which ones,
though i know the possible elements are:
<DEFINE>
<DICTATION>
<GRAMMAR> (document element)
<ID>
<L>
<LIST>
<O>
<OPT>
<P>
<PHRASE>
<RESOURCE>
<RULE>
<RULEREF>
<TEXTBUFFER>
<WILDCARD>
and a simple 1 ID+RULE i have allready made is like this:
<GRAMMAR LANGID="409">
<DEFINE><ID NAME="go" VAL="1"/></DEFINE>
<RULE ID="1" NAME="go" TOPLEVEL="ACTIVE">
<P>Go</P>
</RULE>
</GRAMMAR>
I hope my Q is not too long..
I'll Appriciate anybody's Help,
Thanks everybody!!!
Ray.
p.s
Here is a link to MS website with the SAPI 5.1 XML Grammer Schema.. (I could get it open only in IE and not in Mozilla..), sorry i couldn't link it since i had to Ignore HTML tags in this msg, and could not get it otherwise..(not even with the "pre")
http://msdn.microsoft.com/library/en-us/SAPI51sr/WhitePapers/grammar.xsd
|
|
|
|
|
Can anybody help me? Please?
|
|
|
|
|
hi ,
I m developing application which contain information about chemical compound. all formula of chemical compound contains superscript & subscript. I store value in database using sub & sup Tag .but crystal report does not support these tag
how can we change formula to subscript & superscript form in crystal Report as following
NH4Al(SO4)2.12H2O
Any help will be appreciated
Thanks in advance
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
I m trying to run a project in vb.net 2005 (upgraded from vb.net 2003).
Im getting the follwoing problem.
An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
pls help me out.
thanx in adv.
Regards
Paramhans
|
|
|
|
|
It looks like your code is trying to create a COM object, but that COM Server is not installed on your machine. Step through your code, line-by-line to see where the error is occuring. All you have to do is hit F10 instead of F5 to start your app and stop after the first line of code. Hit F10 again to do the next line, and so on...
|
|
|
|
|
thanx for reply.
error is generated on InitializeComponent()
|
|
|
|
|
When you get to that line, Hit F11 instead to "Step into" that code.
|
|
|
|
|
following error msg is generated when I m trying to open some forms of the project.
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Container.ValidateName(IComponent component, String name)
at System.ComponentModel.Container.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)
regards
Paramhans
|
|
|
|
|
Again, without the code, posting the stack trace is just about useless. The top of the stack says there was a problem creating an instance of a COM server. When you code gets to InitializeComponent, hit F11 to step into it and keep going until you find the line that bombs.
|
|
|
|
|
I know 1.1 didnt but Im curious if 2.0 does. I want to list the currently opened windows in an application which could be unlimited technically and would like to be able to create a new MenuItem at runtime for each open window. I already have a plan for knowing the open windows.
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
CleaKO wrote: I know 1.1 didnt but Im curious if 2.0 does.
What you have described is possible in .NET 1.1
A MenuItem is an object, just like any other. You create one and add it to the appropriate parent menu item.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Wow I had some bad wording on my question...
I meant to ask dynamically named and created controls where I dont have a set number of values which isnt what I really needed anyway, but thanks!
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
If i understand your question right, then yes you can. I needed to do something similar for a button bar for a project...I needed to be able to take a datatable and insert each row into a button bar as a button...There is alot more code then this for the entire process, but maybe this will give you an idea...
Imports DevExpress.XtraEditors<br />
Imports System.Drawing<br />
Imports ZipsUtils<br />
<br />
Public Class ButtonBarButton<br />
<br />
#Region " Const "<br />
Public Const kSpacing As Integer = 6<br />
<br />
Public Const kButtonTopH As Integer = 3<br />
Public Const kButtonLeftV As Integer = 6<br />
<br />
Public Const kLabelTopH As Integer = 102<br />
Public Const kLabelLeftV As Integer = 6<br />
Public Const kLabelHeight As Integer = 13<br />
#End Region<br />
<br />
#Region " Variables "<br />
Private mDevButton As SimpleButton<br />
Private mLabel As DevExpress.XtraEditors.LabelControl<br />
Private mButton As IZipsButtonBarButton<br />
Private mContainer As XtraScrollableControl<br />
Private mUseLabel As Boolean<br />
#End Region<br />
<br />
#Region " Propertys "<br />
Public ReadOnly Property DevButton() As SimpleButton<br />
Get<br />
Return mDevButton<br />
End Get<br />
End Property<br />
<br />
Public ReadOnly Property Label() As DevExpress.XtraEditors.LabelControl<br />
Get<br />
Return mLabel<br />
End Get<br />
End Property<br />
<br />
Public ReadOnly Property ButtonBarButton() As IZipsButtonBarButton<br />
Get<br />
Return mButton<br />
End Get<br />
End Property<br />
#End Region<br />
<br />
#Region " Constructor "<br />
Public Sub New(ByVal theButton As IZipsButtonBarButton, ByVal container As XtraScrollableControl, ByVal allignVerticaly As Boolean, ByVal theSize As Size, ByVal useLabels As Boolean)<br />
mButton = theButton<br />
mContainer = container<br />
mUseLabel = useLabels<br />
<br />
Dim numControls As Integer = mContainer.Controls.Count<br />
If Not allignVerticaly Then<br />
If mUseLabel Then<br />
Dim x As Integer = CInt(((numControls >> 1) * (theSize.Width + kSpacing)) + kSpacing)<br />
<br />
CreateButton(New Point(x, kButtonTopH), New Size(theSize.Width, theSize.Height), (numControls >> 1))<br />
CreateLabel(New Point(x, kLabelTopH), New Size(theSize.Width, kLabelHeight), (numControls >> 1))<br />
Else<br />
Dim x As Integer = CInt(numControls * (theSize.Width + kSpacing))<br />
<br />
CreateButton(New Point(x, kButtonTopH), New Size(theSize.Width, theSize.Height), numControls)<br />
End If<br />
Else<br />
If mUseLabel Then<br />
Dim y As Integer = ((kSpacing + ((numControls >> 1) * (theSize.Height + kSpacing))) + (kSpacing + ((numControls >> 1) * (kLabelHeight + kSpacing))))<br />
<br />
CreateButton(New Point(kButtonLeftV, y), New Size(theSize.Width, theSize.Height), (numControls >> 1))<br />
CreateLabel(New Point(kButtonLeftV, ((y + theSize.Height) + (kSpacing >> 1))), New Size(theSize.Width, kLabelHeight), (numControls >> 1))<br />
Else<br />
Dim y As Integer = (kSpacing + (numControls * (theSize.Height + kSpacing)))<br />
<br />
CreateButton(New Point(kButtonLeftV, y), New Size(theSize.Width, theSize.Height), numControls)<br />
End If<br />
End If<br />
End Sub<br />
#End Region<br />
<br />
#Region " Subs "<br />
Public Sub CreateButton(ByVal location As Point, ByVal size As Size, ByVal incrementSeed As Integer)<br />
Dim setImg As Image = Nothing<br />
If Not mButton.Image Is Nothing Then<br />
setImg = DBConLite.GetResizedImage(mButton.Image, New Size(size.Width, size.Height))<br />
End If<br />
<br />
mButton.Size = size<br />
<br />
mDevButton = New DevExpress.XtraEditors.SimpleButton<br />
With mDevButton<br />
.Location = location<br />
.Name = "SimpleButton" & incrementSeed<br />
.Size = size<br />
.TabIndex = 0<br />
<br />
If Not setImg Is Nothing Then<br />
.Image = setImg<br />
Else<br />
.Text = mButton.Name<br />
End If<br />
<br />
.Tag = Me<br />
End With<br />
<br />
mContainer.Controls.Add(mDevButton)<br />
End Sub<br />
<br />
Public Sub CreateLabel(ByVal location As Point, ByVal size As Size, ByVal incrementSeed As Integer)<br />
mLabel = New DevExpress.XtraEditors.LabelControl<br />
With mLabel<br />
.Appearance.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))<br />
.Appearance.Options.UseFont = True<br />
.Appearance.Options.UseTextOptions = True<br />
.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center<br />
.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None<br />
.Location = location<br />
.Name = "LabelControl" & incrementSeed<br />
.Size = size<br />
.TabIndex = 0<br />
.Text = mButton.Name<br />
.Tag = Me<br />
End With<br />
<br />
mContainer.Controls.Add(mLabel)<br />
End Sub<br />
<br />
Public Sub Dispose()<br />
mDevButton.Dispose()<br />
<br />
If mUseLabel Then<br />
mLabel.Dispose()<br />
End If<br />
<br />
mDevButton = Nothing<br />
mLabel = Nothing<br />
mButton = Nothing<br />
End Sub<br />
#End Region<br />
<br />
End Class
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
How am I supposed to do this? Even with public Sub or Function definitions intellisence isn't displaying the methods when I type Me.SubFormName. while editing the code of the parent. I tried just typing the name of the method in manually to see if it was just an intellisence problem but that triggers a runtime error because "the method or data member not found".
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
i am using vb.net 2003.i am doing my project in vb.net windows application.
how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime.
for example,
values are in datagrid like
name age rollno city
ramu 22 68 chennai
rajesh 23 70 cbe
kamal 21 52 salem
arun 25 04 trichy
here name,age,rollno,city are field name.now i want to remove selected row permanently from sql database through datagrid.In this datagrid,if i select "kamal" row(kamal,21,52,salem) means,that kamal row will remove permanently from sql database.how to do these.i want in vb.net windows application,not web application.plz help me.
|
|
|
|
|
If the datagrid is bound to the dataset, all you would have to do is select the row, hit the delete key to mark the row for deletion.
In your code, you would have to use an SqlDataAdpater[^] to update the database from the modified dataset. This code would typically be behind a "Save Changes" button on your form with the datagrid.
|
|
|
|
|