|
awu25 wrote: ActiveX control for web created in .net 3.5
No you don't. None of the managed code compilers target building an ActiveX control. You can build something that exposes interfaces through COM, but it's not an "ActiveX control".
|
|
|
|
|
Hi all,
I'm attempting to load an xml document from an XML column in MSSQL 2008, into an XmlDocument (see code below).
Sometimes the code will break at the <b>xdoc.Load(xr)</b> line with the error "Unexpected end of file and occurred". After breaking, the XmlReader has a value of "None".
While researching the problem, I saw posts that referred to a 4Kb limit on StreamReaders and figured this may be related somehow. So I cut down the size of my document (to around 4Kb) and everything worked fine.
On average, the XML documents I'm importing from the database are 20Kb and thanks to validation on INSERT by MSSQL, we can assume(?) the document is well-formed.
Does anyone know how to get 'large' amounts of XML from the database into my XmlDocument?
Dim xr As XmlReader = ExportAdapter.GetEditedCheckXML(chkId)
Dim xdoc As New XmlDocument
xdoc.Load(xr)
Here's the GetEditedCheck fn:
Public Shared Function GetEditedCheckXML(ByVal checkId As Integer) As XmlReader
Dim conn As SqlConnection = New SqlConnection(CONNECTION_STRING)
Dim comm As New SqlCommand("PS_GetModifiedXmlByCheckId", conn)
Dim adap As New SqlDataAdapter
comm.CommandType = CommandType.StoredProcedure
comm.Parameters.Add("@checkId", SqlDbType.Int).Value = CInt(checkId)
conn.Open()
Dim xml = comm.ExecuteXmlReader()
xml.Read()
conn.Close()
Return xml
End Function
|
|
|
|
|
Dear all,
Please help me ...
I want to add two datatable in dataset. I did as below code. when adatapter fill to 2nd table. It fill with first query statement.
So both table get same result.
Want to know how to get different result.
Dim acon As New SqlConnection(ConfigurationManager.ConnectionStrings("DOCDBDWHConnectionString").ConnectionString)
Dim acmd As New SqlCommand()
Dim sSql As String
acon.Open()
sSql = "select distinct vessel_code,vessel_desc from D4A_RAW_BLP"
acmd.Connection = acon
acmd.CommandText = sSql
'Pull vessel code
Dim dataset As New DataSet
Dim adpvsl As New SqlDataAdapter
Dim adpvoy As New SqlDataAdapter
adpvsl.SelectCommand = acmd
adpvsl.Fill(dataset, "Vessel")
'Pull voyageno
sSql = ""
sSql = "select distinct voyage_no,vessel_code from D4A_RAW_BLP where vessel_code in (select distinct vessel_code from D4A_RAW_BLP where vessel_code<>'') order by vessel_code"
adpvoy.Fill(dataset, "voyage")
Thanks and best Regards
|
|
|
|
|
I bet if you look again, you'll spot what's wrong, and that the problem is that you've been staring at this too long. As you are aware, a string is an immutable object, so setting acmd.CommandText = sSql means that you get the value of sSql at the time you assign it. As you have only changed sSql for the voyageno, you will get the same results because you have issued the original query again. What you need to do is set the SelectCommand again, but this time to the new value of sSql.
BTW - you don't need the line sSql = "" .
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thank you!
Get result as your reply.
|
|
|
|
|
You're welcome.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi
In my page i write like this:
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),"Msg","<script>alert('Employee information is not valid...');</script>",true);
But no popup window open ..is this right code?
|
|
|
|
|
Try following code.
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),"Msg","<script>alert('Employee information is not valid...');</script>",false);
You were supplied last argument as true, which denotes that it will add script tag automatically.
While you already provided script tag.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I tried making last argument false as well but it still not giving the popup block
|
|
|
|
|
Are you trying to get that script executed when the page is sent back to the browser??
This question should really be asked in the ASP.NET forum.
|
|
|
|
|
Do You have AJAX Script Manager in your web page. If you then you need to use ScriptManager.RegisterClientScriptBlock .
|
|
|
|
|
ScriptManager is not necessary to inject script blocks into the page, even if you are using Ajax.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: ScriptManager is not necessary to inject script blocks into the page, even if you are using Ajax.
Agree Mark.
I just asked him to check if he has used scriptmanager then he need to use scriptmanager.register..
Yes, this is not necessary. But It can be used.
|
|
|
|
|
Is there a way to see the metadata of the assembly file ?
|
|
|
|
|
Use a tool called ILDASM.
Quidquid latine dictum sit, altum videtur.
Whatever is said in Latin sounds profound.
|
|
|
|
|
You can view it using this[^] Tool.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Hi everybody. Please I want to develop any type of website using the .NET Framework. I have the software installed on my notebook. Thanks and hope to receive a feedback sooner.
|
|
|
|
|
This[^] would be the best place to start.
It's time for a new signature.
|
|
|
|
|
Sean has done a very good job by compiling all the good resources for web development together.
So, check it out: Beginner's Walk - Web Development[^]
I am sure, it will help you.
..Go Green..
|
|
|
|
|
Following is the best link to get started with Asp.NET.
Get Started[^]
It covers following points.
1. What is ASP.NET?
2. Download ASP.NET and Visual Studio Express Tools (FREE)
3. Build your First ASP.NET Web Application
4. Follow a Step-By-Step ASP.NET Tutorial
5. Learn More about ASP.NET
6. Host your ASP.NET Web sites on the Web
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I have the task of deserializing objects from a binary formatter that were serialized using VB.Net's binary formatter. The ONLY issue I have come across is that the original class had a field, the same name as the class
structure MyName
...
dim MyName as String
end structure
In VB, this was apparently find, but in C#, I cannot write the class this way. I've rewritten it so that
struct MyName
{
...
string myName
}
but now the deserialization fails (because, I assume, the field name has changed). I have ONLY changed the name of the attribute. I guess this is enough to throw off the deserialization.
Is there away that I can fix this dynamically, or should I resort to the binary reader and parsing the binary file manually?
Thank you for any considerations you could throw my way.
Dave
|
|
|
|
|
I'm not sure it can be solved at all, but if it does, it probably will be based on SerializationBinder . Start Googling!
|
|
|
|
|
hi,
it might help using Attributes for Serialization like i.e.:
<br />
struct MyName<br />
{<br />
[XmlElement("MyName")]<br />
string myName;<br />
}<br />
|
|
|
|
|
Go back and read the OP again. He's using binary formatter, not XML.
|
|
|
|
|
ups my fault ^^
|
|
|
|