|
hi
i m new to the field of activex and i want to know that are activeX (internet activex) made in the vc or vb are capable of self registering. or had to something extra to
register them. particularly the (internet activex) controll. if not that what functions will be used to register them.
i had made the (internet activex) that play the movie on the page i want to know that when user will visit my page then ocx will be selfdownloaded
and selfrejisted to that client pc. or what will happen.
ddd
|
|
|
|
|
I have a form that has multiple textboxes that a user needs to input data into in order to write to several tables within sql server. All of the controls on the form are data binded to a column within a specific table. I can read from all tables using the (generic) code command:
DataAdapter.Fill(DataSet)
My problem is that I can not update/write to the database. I'm using the (generic) code command: DataAdapter.Update(DataSet), so that when any change is made to any textbox control when the user triggers the click event button to update the database it will update/write to the database using what is currently in the textboxes.
I receive no error messages and my 'CommandText' property under the dataAdapter has the sql code generated to insert a into the proper fields and tables. Any idea(s) why I can not update/write to the sql server?
Language: vb.net 2003
Server: sql server 2000
Shannon P.
|
|
|
|
|
My advice is to write one stored procedure that updates all the appropriate tables. Once you have your stored procedure written call it like this. Also put imports data.sqlclient at the top of your page. This is an example from the project I'm working on, obviously you need to use your own names / variables.
Private Function UpdateLiabilityRecord(ByVal intClassID As Integer)
Dim Conn As New SqlConnection
Conn.ConnectionString = Session("ConnectionString")
Dim Cmd As New SqlCommand
Cmd.Connection = Conn
Cmd.CommandType = CommandType.StoredProcedure
Cmd.CommandText = "dbo.USP_AM_UpdateLiabilityClass"
Dim PrmClassID As New SqlParameter("@ClassID", SqlDbType.Int)
PrmClassID.Direction = ParameterDirection.Input
Cmd.Parameters.Add(PrmClassID)
PrmClassID.Value = intClassID
Dim PrmClassCode As New SqlParameter("@ClassCode", SqlDbType.Char, 6)
PrmClassCode.Direction = ParameterDirection.Input
Cmd.Parameters.Add(PrmClassCode)
PrmClassCode.Value = Right("000000" & Trim(Me.txtClassCode.Text), 6)
Dim PrmEffectiveDate As New SqlParameter("@EffectiveDate", SqlDbType.DateTime)
PrmEffectiveDate.Direction = ParameterDirection.Input
Cmd.Parameters.Add(PrmEffectiveDate)
PrmEffectiveDate.Value = CDate(Me.txtEffDate.Text)
Conn.Open()
Cmd.ExecuteNonQuery()
Conn.Close()
End Function
Of course, don't forget to validate your data first.
"People who never make mistakes, never do anything."
My blog
http://toddsnotsoamazinglife.blogspot.com/
|
|
|
|
|
Hello all,
I am receive an error that a parameter has not been supplied when the page loads, And this error would be correct because it is not to be supplied until a user makes a selection after the page loads.
Here is what i have: I HAVE two data list on one page, one is a menu (a) and the other (b) one populates when the selection has been made; therefore, the error parameter that im getting tells me that the (b) is tring to fire to early.
The way that i have the controls set up is just a simple drag and drop from the solution bar to the page in question. Is there some sort of code that i should add that would keep (b) from tring to fire up early?
Thank you ahead of time.
Erik...
|
|
|
|
|
Yeah add the data to your data list via code not from the designer. Copy the auto generated code to the postback event from the the first list.
"People who never make mistakes, never do anything."
My blog
http://toddsnotsoamazinglife.blogspot.com/
|
|
|
|
|
The way that i am implementing it at this time is i have all of my class files in a seperate folder with the same namespace. and i access the info for the databind via namespace.class ----- dl.datasource = myfunction
and i am getting aggggg with this wall i keep hitting with this error that
(((expects parameter '@IDProduct', which was not supplied. )))
I know the parameter has been passed because i can see it in the address bar, and there is other controls that rely on this ProductID so i know it is making it to the requesting page. What do you think that i am doing wrong here.
Any help at all will be great!
Thank you ahead of time..
erik..
|
|
|
|
|
Hey, I have two forms one w/ a list of Projects and the other w/ a checklist for the project selected from the Project form. I have created a checkbox in the Projects form that is suppose to be checked when a project checklist has been created/started.....how do I go about doing this??
|
|
|
|
|
|
How can pass the Query in CrystalReport
in run time and show the data in CrystalReport
This is the sample query I press the button
that time the the name and Address how to
show in CrystalReport
"select name,Address" from tb_book"
Os: winxp
Report: CrystelReport 9
VB.net
Continue...
|
|
|
|
|
I don't think you can pass the entire query. You can pass parameters to or the crystal reports filter. You can also run a crystal report of an xml file or dataset, but I doubt you can pass the entire query.
"People who never make mistakes, never do anything."
My blog
http://toddsnotsoamazinglife.blogspot.com/
|
|
|
|
|
how do i get infomation from a database using a datagrid using sql
|
|
|
|
|
Which language are you writing this in? J#, C#, VB, etc, what?
Are you using .Net 2003? VB6? Give as much information as possible.
What are you trying to do specifically?
-Nclero
|
|
|
|
|
Nclero wrote:
Which language are you writing this in?
i suppose it is in VB as we are currently talking on the VB Forum
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
search the MSDN for SQLDataAdapter ... this class provides good functions to work with ADO, but of course, with MS SQL Server too...
what RDB do you query on ?
what language do you use also, VB6 or VB.NET ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
search MSDN by keywords "ADO.NET" ,there are lots of samples tell us how to do so
Today is a gift, that's why we call it present
|
|
|
|
|
how do i display infomation from two different tables created in access on a data grid using VB 6.0
how do i also add and remove infomation froma a datagrid that is from a VB 6.0 interface and at the same time update the da:-Dtabase
|
|
|
|
|
Have you ever taken a look at the MSDN?
Try www.msdn.com and ask your question in there - not to brush you off or anything, but they can answer your question with a greater level of detail and you'll get more out of it that way.
Trust me, as a programmer myself, the MSDN and I have gotten very close over the years.
-Nclero
|
|
|
|
|
I am making my own version of a media player. The progress is going great except that the DS control (msvidctl.dll) will not play MPEG-2 files. I thought that the control would handle this automatically. MSDN says that we need to specifiy the MPEG-2 Demuxer and other stuff. Could anyone please post some sample code (VB would be prefered, but otherwise I can join the peices from other languages). I am not using Microsoft.DirectX.AudioVideoPlayback.dll, even thought it works great I cannot combine this assembly with anyother dll using ILMerge.
I have also built a DVD application using the same dll, the only help I need is figure out how to control the dvd navigation filter. At the moment I use
DScontrol.view("DVD:")
This snippet will allow me to play dvds but I cannot control which drive I want to play i.e. If I have 2 drives with dvd movies in the them, the drive that has the master setting on the IDE bus or lower drive letter(dont remember which one of the 2) will play everytime. If I eject one of them, the other one will play. Does anyone know how I can command a specific drive to play a dvd movie? Your help is greatly appreciated.
Thanks
|
|
|
|
|
Figured out the first part. I needed to install an "MPEG2 decoder." But I already have PowerDVD 6 w/ valid DX and WMP10 decoder, for some reason reinstalling PDVD allowed my MPEG2 playback. Another weird thing is that WMP10 and PDVD both played MPEG2 files and DVD but my DS app was throwing exceptions (even though they have the same base classes) ?!#!@# Gotta love Microsoft stuff .
However I still need help on the second part, the DVD navigation filter. Any help would be great. Thanks
|
|
|
|
|
hello, I have try to translate this code into vb.net but that does not function, my richtextbox is black, Can't you translate it into vb.net for me please
class TransparentControl : Control
{
public TransparentControl()
{
base.SetStyle( ControlStyles.UserPaint, true );
base.SetStyle( ControlStyles.DoubleBuffer, true );
base.SetStyle( ControlStyles.SupportsTransparentBackColor, true );
}
}
class TransparentRichTextBox : RichTextBox
{
public TransparentRichTextBox()
{
base.ScrollBars = RichTextBoxScrollBars.None;
}
override protected CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x20;
return cp;
}
}
override protected void OnPaintBackground( PaintEventArgs e )
{
}
}
|
|
|
|
|
Class TransparentControl
Inherits Control
Public Sub New()
MyBase.SetStyle(ControlStyles.UserPaint, True)
MyBase.SetStyle(ControlStyles.DoubleBuffer, True)
MyBase.SetStyle(ControlStyles.SupportsTransparentBackColor, True)
End Sub
End Class
Class TransparentRichTextBox
Inherits RichTextBox
Public Sub New()
MyBase.ScrollBars = RichTextBoxScrollBars.None
End Sub
Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ExStyle = cp.ExStyle Or (32)
Return cp
End Get
End Property
Protected Overloads Overrides Sub OnPaintBackground(ByVal e As PaintEventArgs)
End Sub
End Class
'Convert C# to VB.NET
'http://www.developerfusion.com/utilities/convertcsharptovb.aspx
|
|
|
|
|
I have a date field and a dropdown list on web form. The dropdown list contains 3 values.
I want that when I populate the Date field the dropdown list will be automatically set to one of the values in the drop down namely dated.
Has anyone any ideas how to do this?
thanks,
macca
|
|
|
|
|
you could use the tag member to store any non-displayed object on your combobox (useful when used to search on another point than the caption...)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I have a label called department and a text box called text department. In my code I am retriving the department Id which is A.
What I want is that if the department Id is A then I want the above label and textbox to appear on the web form but if the dpartment Id is not A I want the above label and textbox not to appear on the web form.
In the code I have something like this:
deptId = P
If DeptID = A then
label = active
textbox = active
else
label = inactive
textbox = inactive
can anyone help with this?
macca
|
|
|
|
|
Try using visible property
Something like
If DeptID = A then
label1.visible = false
textbox1.visible = false
else
label1.visible = true.......
- ashish
|
|
|
|