Click here to Skip to main content
16,007,163 members
Home / Discussions / Database
   

Database

 
GeneralRe: Stored Procedure PRoblem Pin
WoutL31-Dec-04 0:43
WoutL31-Dec-04 0:43 
GeneralUnable to install Oracle 8i Release 3 Pin
missnazar30-Dec-04 0:02
missnazar30-Dec-04 0:02 
GeneralRe: Unable to install Oracle 8i Release 3 Pin
Graham Bradshaw30-Dec-04 0:18
Graham Bradshaw30-Dec-04 0:18 
GeneralRe: Unable to install Oracle 8i Release 3 Pin
missnazar30-Dec-04 3:46
missnazar30-Dec-04 3:46 
GeneralWhy Reset button does not work more than once in ASP.NET web application Pin
amittinku29-Dec-04 23:03
amittinku29-Dec-04 23:03 
GeneralRe: Why Reset button does not work more than once in ASP.NET web application Pin
Colin Angus Mackay1-Jan-05 3:07
Colin Angus Mackay1-Jan-05 3:07 
QuestionWhy ASP.NET webapplications/webservies are not running/working on my system? Pin
amittinku29-Dec-04 20:10
amittinku29-Dec-04 20:10 
GeneralInconsistent, but there should be an explanation Pin
mysorian29-Dec-04 11:11
professionalmysorian29-Dec-04 11:11 
This refers to the records returned by the "For XML auto" in ADO.Net.
The first case is simply retirning results from a select statement from a
table returning some columns with for xml auto.
--------------------------------------------
[No erros, results returned]
Database2, connection2
SqlConnection1.Open()<br />
        Dim SQLCmd As New SqlClient.SqlCommand<br />
        SQLCmd.Connection = SqlConnection1<br />
        SQLCmd.CommandType = CommandType.Text<br />
        SQLCmd.CommandTimeout = 20<br />
        SQLCmd.CommandText = "SELECT CustomerID, CompanyName, City, PostalCode, Phone FROM Customers FOR xml auto"<br />
        Dim myXmlReader As System.Xml.XmlReader = SQLCmd.ExecuteXmlReader()<br />
<br />
        'myXmlReader.MoveToContent()<br />
        'myXmlReader.MoveToElement()<br />
        Response.Write("<table border='1'>")<br />
<br />
        While myXmlReader.Read<br />
            'Response.Write(myXmlReader.Item("CustomerID") & "<br>")<br />
            Response.Write("<tr><td>" & myXmlReader.Item("CustomerID") & " " & myXmlReader.Item("CompanyName") & _<br />
             myXmlReader.Item("City") & "" & myXmlReader.Item("PostalCode") & "</td></tr>")<br />
        End While<br />
        Response.Write("</table>")<br />
        myXmlReader.Close()<br />
        SqlConnection1.Close()<br />

[No errors, results returned]
-----------------------
The second case is, results expected to be returned from table joins using For xml auto. In this case no results were returned, no errors or exceptions, exactly same trace info as in the first case
[No errors, no output(empty table), trace info exactly same as the one with results returned]
Database1, connection string1
SqlConnection1.Open()<br />
        Dim SQLCmd As New SqlClient.SqlCommand<br />
        SQLCmd.Connection = SqlConnection1<br />
        SQLCmd.CommandType = CommandType.Text<br />
        SQLCmd.CommandTimeout = 20<br />
        SQLCmd.CommandText = "SELECT nums.NumId, nums.Nums, color.colr FROM color INNER JOIN nums ON color.numid = nums.NumId FOR xml auto, ELEMENTS"<br />
        'SELECT nums.NumId, nums.Nums, color.colr FROM color INNER JOIN nums ON color.numid = nums.NumId FOR xml auto<br />
        'SELECT CustomerID, CompanyName, City, PostalCode, Phone FROM Customers FOR xml auto<br />
        Dim myXmlReader As System.Xml.XmlReader = SQLCmd.ExecuteXmlReader()<br />
        Response.Write("<table border='1'>")<br />
<br />
        While myXmlReader.Read<br />
            'Response.Write(myXmlReader.Item("CustomerID") & "<br>")<br />
<br />
            Response.Write("<tr><td>" & myXmlReader.Item("nums.NumId") & " " & myXmlReader.Item("nums.Nums") & _<br />
             myXmlReader.Item("color.colr") & "</td></tr>")<br />
        End While<br />
        Response.Write("</table>")<br />
        myXmlReader.Close()<br />
        SqlConnection1.Close()<br />

[No errors, no output]
What could be different?
GeneralRe: Inconsistent, but there should be an explanation Pin
Rob Graham30-Dec-04 14:14
Rob Graham30-Dec-04 14:14 
GeneralRe: Inconsistent, but there should be an explanation Pin
mysorian30-Dec-04 18:32
professionalmysorian30-Dec-04 18:32 
GeneralCase-Sensitive Pin
Ahmed Galal29-Dec-04 0:13
Ahmed Galal29-Dec-04 0:13 
GeneralRe: Case-Sensitive Pin
Colin Angus Mackay29-Dec-04 1:40
Colin Angus Mackay29-Dec-04 1:40 
GeneralRe: Case-Sensitive Pin
Ahmed Galal29-Dec-04 2:33
Ahmed Galal29-Dec-04 2:33 
Generalasp ado problem. Pin
RomanD28-Dec-04 16:02
RomanD28-Dec-04 16:02 
GeneralRe: asp ado problem. Pin
Colin Angus Mackay29-Dec-04 1:33
Colin Angus Mackay29-Dec-04 1:33 
GeneralRe: asp ado problem. Pin
mysorian29-Dec-04 10:57
professionalmysorian29-Dec-04 10:57 
GeneralRe: asp ado problem. Pin
mysorian29-Dec-04 10:57
professionalmysorian29-Dec-04 10:57 
GeneralRe: asp ado problem. Pin
RomanD29-Dec-04 12:37
RomanD29-Dec-04 12:37 
GeneralRe: asp ado problem. Pin
Mike Dimmick30-Dec-04 3:58
Mike Dimmick30-Dec-04 3:58 
Generalsql exec Pin
SudeepPradhan28-Dec-04 13:59
SudeepPradhan28-Dec-04 13:59 
GeneralRe: sql exec Pin
Javier Lozano28-Dec-04 14:40
Javier Lozano28-Dec-04 14:40 
GeneralRe: sql exec Pin
Colin Angus Mackay28-Dec-04 14:44
Colin Angus Mackay28-Dec-04 14:44 
GeneralAdding user-defined property to Access db Pin
sharonz28-Dec-04 6:06
sharonz28-Dec-04 6:06 
GeneralADO.net in unmanaged code Pin
MARROT28-Dec-04 4:42
MARROT28-Dec-04 4:42 
GeneralSame SQL Statement in access and in vb.net return difference result Pin
Mekong River27-Dec-04 21:30
Mekong River27-Dec-04 21:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.