|
OK, sounds like an issue in your AVI.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Either the AVI is currupted or you don't have the appropriate video codecs to decode the video stream.
|
|
|
|
|
i need to select row by index from database sql server
fro example i want to reterive row in the index 5
what the correct sql statemnet for that purpose
md_refay
|
|
|
|
|
Hi,
I don't understand what your question is.
However I am gathering that you want to retrieve a record by referencing an index in SQL.
In SQL you do not access the indexes, they are set up by you to enable faster querying of data.
SQL will determine which index to use based on the query you supply, which is why creating indexes is so important - create an index incorrectly and you will slow down processing.
Having said that you can drop hints on which index to use in SQL.
So having said all of this:
1 - is this of any help to you?
2 - you refer to index 5, what is index 5?
regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
There are no numerical indexes in an SQL database. It doesn't work like an array of values. SQL Server does not guarantee the order of the records that comes out of the table unless you tell it to using the SELECT statements ORDER BY clause. For ORDER BY to work, you have to give it a column to sort on.
Once the table is returned, you can use an index number in the resulting DataTable object to get the row, though there's no real usefulness to this. Normally you'd just retrieve the one row you wanted from the database using a SELECT statement and a WHERE clause specifying a search criteria for the row you wanted.
|
|
|
|
|
Hi,
I have a gridview control in which i have added two comboboxes(cmbCity,cmbPincode) at the runtime.I populate the cmbCity combobox from the database at the form load event.
Now my requirement is that when ever i select an item from cmbCity ,the relevent picode should be automatically populated into cmbPincode.
Please help me out how to handle the cmbCity_SelectedIndexchanged event inside a gridview control..
I am using winforms.(vb.net & sql server 2000)
Pradip Kishore
|
|
|
|
|
Hi,
I need your help!!! I want to use the function StrConv("string", vbFromUnicode) in VBScript.
I found the following code, but the result isn't the same as from VBA, I tested in Excel.
Do anyone has any suggestion?
<br />
Public Function StrConv(stringData,conversion)<br />
Dim Stream<br />
Dim tmp<br />
Set Stream = CreateObject("ADODB.Stream")<br />
' Charsets <br />
' Windows-1252<br />
' Windows-1257<br />
' UTF-8<br />
' UTF-7<br />
' ASCII<br />
' X-ANSI<br />
Const UnicodeCharaset = "Windows-1252"<br />
Const BinaryCharset = "X-ANSI"<br />
Select Case conversion<br />
Case vbFromUnicode<br />
' Converts a Unicode string to Ascii<br />
With Stream<br />
.Charset = UnicodeCharaset<br />
.Type = 2<br />
.Open<br />
.WriteText stringData<br />
.Position = 0<br />
.Charset = BinaryCharset<br />
.Type = 1<br />
StrConv = MidB(.Read, 1)<br />
End With<br />
<br />
Case vbUnicode<br />
' Converts an Ascii string to Unicode<br />
Dim Length<br />
Dim Buffer<br />
<br />
If TypeName(stringData) = "Null" Then<br />
CStrU = ""<br />
Exit Function<br />
End If<br />
<br />
stringData = MidB(stringData, 1)<br />
<br />
Length = LenB(stringData)<br />
Dim Rs<br />
Set Rs = Server.CreateObject("ADODB.Recordset")<br />
Call Rs.Fields.Append("BinaryData", adLongVarBinary, Length)<br />
Rs.Open<br />
Rs.AddNew<br />
Rs.Fields("BinaryData").AppendChunk(stringData & ChrB(0))<br />
Rs.Update<br />
Buffer = Rs.Fields("BinaryData").GetChunk(Length)<br />
Rs.Close<br />
Set Rs = Nothing<br />
With Stream<br />
.Charset = BinaryCharset<br />
.Type = adTypeBinary<br />
.Open<br />
Call .Write(Buffer)<br />
.Position = 0<br />
.Type = adTypeText<br />
.Charset = UnicodeCharaset<br />
End With<br />
<br />
StrConv = Stream.ReadText(-1)<br />
End Select<br />
Stream.Close<br />
Set Stream = Nothing<br />
End Function<br />
|
|
|
|
|
You haven't even asked a question so there's really nothing to tell you.
gbgift wrote: I want to use the function StrConv("string", vbFromUnicode) in VBScript.
To do what??
gbgift wrote: I found the following code, but the result isn't the same as from VBA, I tested in Excel.
What's the "result"?? How is it different from what you expected?? What you trying to do with this code??
|
|
|
|
|
|
Look at the Case statements in your code. Where are these constants defined?? vbUnicode ??, vbFromUniCode ??
|
|
|
|
|
Const vbFromUnicode = 128
Const vbUnicode = 64
|
|
|
|
|
|
hello to all of you out their
i m using vb.net 2005, .net framework version 2.0. and trying to uploading file to my local server with my application.
the problem comes when i try to upload a file to the server, with the code
My.Computer.Network.UploadFile("C:\Documents and Settings\Administrator\Desktop\ashish.txt", "http://192.168.0.3/isol/ashish.txt", "", "", True, 1000, FileIO.UICancelOption.ThrowException)
it throw an error 404 not found
when i place a file having same name on the server, the program cannot throw any error but the file cannot be uploaded.
if i replace the code with this one, the code works fine and it places the file on the located computer.
My.Computer.Network.UploadFile("C:\Documents and Settings\Administrator\Desktop\ashish.txt", "file://///192.168.0.3/c/ashish.txt", "", "", True, 1000, FileIO.UICancelOption.ThrowException)
but this is not something like client/server this is simple network, i need to check it with online website. the server computer contain apache 2.0.59.
i think the problem is with the configuration of apache. i m working on it.
if some has any idea about that please let me know.
any kind of help is highly appreciated.
thanks in advance
help everyone
|
|
|
|
|
If you want to upload a file using http, you need to post the file to a web page that can recieve the file.
If you want to uplad a file using ftp, use the ftp protocol in the url instead of the http protocol.
---
single minded; short sighted; long gone;
|
|
|
|
|
i simply want to paste the file in the folder named upload on server
is it necessary that their must be a page to get my file on server.
can u tell me how can i rename files on server
(this is an alternate of my application that i can upload files from third party tools and then rename the file as needed on server)
if i simply replace the protocol from http from ftp it gives me the error
an exception occured during a webclient request. the requested ftp command is not supported when using http proxy.
have any idea then please let me know
thanks
help everyone
|
|
|
|
|
eyes2007 wrote: i simply want to paste the file in the folder named upload on server
is it necessary that their must be a page to get my file on server.
Yes, if you want to use the http protocol. You can't save a file using the http protocol, you can only send a request to the server that contains the file data, and the page on the server can recieve the file data and save it as a file on the server.
eyes2007 wrote: f i simply replace the protocol from http from ftp it gives me the error
an exception occured during a webclient request. the requested ftp command is not supported when using http proxy.
You can't upload files to ftp when using a proxy. Try turning off the proxy, as suggested here:
http://www.vbforums.com/showthread.php?t=384411[^]
---
single minded; short sighted; long gone;
|
|
|
|
|
can you please provide me some more documentation or links or any thing else
thanks
help everyone
|
|
|
|
|
IS that possible to make Crystal reports without dataset or Database in .net 2005? IF posiible How ?can u please help?
Vv
|
|
|
|
|
What exactly do you mean with "make"? If you mean to create the template you can use xml/xsl files (see here: developerfusion[^] or see here: devarticles[^]) in order to drag and drop the content to its place in the report.
If you mean "bind the data to the report" with "make" it depends on what do you want to display in the report. If you have a table of some sort to display, i dont know any other way to bring the data to the report than using DataSets or a DataBase Connection. If you want to display static data (like a single name, a single date for instance, you can use the following piece of code to insert static text into prior defined fields in the report:
<br />
ReportDocument doc;<br />
doc = new ReportDocument();<br />
doc.Load(reportFileName);<br />
((CrystalDecisions.CrystalReports.Engine.TextObject)doc.ReportDefinition.Sections["YOUR_SECTION_NAME_WHERE_THE_FIELD_IS_LOCATED"].ReportObjects["FIELD_NAME_OF_THE_GIVEN_SECTION"]).Text = YOURNEWFIELDVALUE;<br />
I hope this helps, let me know if you still have issues...
Best regards
Trollpower
|
|
|
|
|
Any other way to create the report without dataset in VB.net 2005
Vv
|
|
|
|
|
You can always create a crystal report (or any other report engines) without any datasource (DB, dataset, mdb, xml, etc)
You can expose fields as parameters and set these parameters in your program.
|
|
|
|
|
hi, i have a little problem in populating my TreeView. i already populated all the Parent Node and its corresponding Child Node orderly. the problem is, when my form load where the treeview is place this is the output.
i attached the picture to be able to understand well because my english is not that good. sorry for that. but anyway the ordering of the Parent and Child Node is correct. what i want is all the child node of the specific parent node will under it.
this is my code
Dim DA As clsDataAccess
Dim DA2 As clsDataAccess
Dim DT As DataTable
Dim DT2 As DataTable
Dim i As Integer
Dim nRow As Integer
Dim nRow2 As Integer
Dim strParent As String
Dim strChild As String
Dim intParent As String
Try
DA = New clsDataAccess
DT = DA.ExecQuery("SELECT DISTINCT(tblMicromixParentNode.intParentNodeID), dbo.tblMicromixParentNode.vchrDescription AS " & _
"vchrParentDesc,dbo.tblMicromixParentNOde.intOrder FROM dbo.tblMicromixMenu INNER JOIN dbo.tblMicromixParentNode ON " & _
"dbo.tblMicromixMenu.intParentNodeID = dbo.tblMicromixParentNode.intParentNodeID ORDER BY intOrder ASC")
If DT.Rows.Count > 0 Then
Dim PNode As Windows.Forms.TreeNode
TV.Nodes.Clear()
For nRow = 0 To DT.Rows.Count - 1
intParent = DT.Rows(nRow).Item("intParentNodeID")
strParent = DT.Rows(nRow).Item("vchrParentDesc")
PNode = TV.Nodes.Add(strParent)
DA2 = New clsDataAccess
DT2 = DA2.ExecQuery("SELECT t1.*, t2.vchrDescription AS vchrFormDesc, " & _
" t2.vchrFormName AS vchrFormName FROM " & _
" tblMicromixMenu t1 INNER JOIN tblMicromixChildNode " & _
" t2 ON t1.intChildNodeID = t2.intChildNodeID " & _
" where t1.intAccessID=1 and t1.intParentNodeID=" & intParent & " and intShow=1")
If DT2.Rows.Count > 0 Then
Dim CNode As TreeNode
For nRow2 = 0 To DT2.Rows.Count - 1
strChild = DT2.Rows(nRow2).Item("vchrFormDesc")
CNode = TV.Nodes.Add(strChild)
Next
End If
PNode.EnsureVisible()
Next
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
by the way i am using vb.net for that.
your reply will be really appreciated.
Thank You.
-- modified at 1:17 Tuesday 25th September, 2007
Don't block the drive way of all the newbies in programming.
|
|
|
|
|
It doesn't work because you didn't add your child nodes to any of the existing parent nodes at all. They're all children of the root.
You're using lousy variable names by the way. It's very difficult to figure out what the variable is used for just be glancing at it.
This section of code should be modified:
If DT2.Rows.Count > 0 Then
Dim CNode As TreeNode
For nRow2 = 0 To DT2.Rows.Count - 1
strChild = DT2.Rows(nRow2).Item("vchrFormDesc")
PNode.Nodes.Add(strChild)
Next
End If
You add the children to the parent node you created above it, not to the root of the TreeView nodes collection.
|
|
|
|
|
first of all thank u for the reply sir.
oh yes i see now. my code below is the same so i get an output that they become all Parent Node.
so my problem now is how can i add the child node in a specific parent node? because in vb6 they have Relative,Relationship and Text. which is the Relative is the Parent Node and the Relationship is the word "tvwChild".
how can i convert this line of code in VB6 to .Net
TreeView1.Nodes.Add(Relative,Relationship,Key,Text,Image)
where the Relationship should be "tvwChild"
Parent Node
For nRow = 0 To DT.Rows.Count - 1
intParent = DT.Rows(nRow).Item("intParentNodeID")
strParent = DT.Rows(nRow).Item("vchrParentDesc")
PNode = TV.Nodes.Add(strParent)
Child Node
If DT2.Rows.Count > 0 Then
Dim CNode As TreeNode
For nRow2 = 0 To DT2.Rows.Count - 1
strChild = DT2.Rows(nRow2).Item("vchrFormDesc")
CNode = TV.Nodes.Add(strChild)
Next
End If
sorry for my english.
Thank You.
Don't block the drive way of all the newbies in programming.
|
|
|
|
|
Did you understand the changes I made to your code in my last post?
You add a parent node to the root of the tree. Then you retrieve all the children of that node from the database and add those to the Nodes collection of the Parent you just added.
|
|
|
|