[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

BC30002: Type 'SqlDataReader' is not defined

Asked by malewis24 in Delphi.net Programming, Web Frameworks, Web Services

How do fix this problem? I keep getting a compile error 'SqlDataReader' is not defined but it's defined in my code. Below is compile error:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30002: Type 'SqlDataReader' is not defined.

Source Error:

Line 39: dim SQLconnection, myCommand, myConnection
Line 40: dim extract as String ="SELECT dteDateUploaded FROM tblDriver ORDER BY dteDateUploaded DESC", connect
Line 41: dim reader As SqlDataReader = _
Line 42:             command.ExecuteReader ( _
Line 43:                 CommandBehavior.CloseConnection)
 

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
<%@ Import Namespace="System.Data.SqlClient.SqlConnection" %>  
<%
    dim keyPostID
	dim varName
	dim dteDateUploaded
	dim varLoc
	dim Desc
	dim numFileSize
	dim OS
	dim ContentType 
	dim BinaryDate
	dim Type1
	dim Manufacturer
	dim Model
	dim DateUp
	dim keyManufacturerID
	dim ynActive
	dim keyDeviceTypeID
	dim All
	dim varDesc2
	dim devicesSupported
	dim dLastUpdate
	dim SqlDataReader
 
	
%>
 
<script runat="server">
 
sub RS
	     Dim sConnString As String = _ 
        "Provider=sqloledb;" & _ 
		"Network Library=DBMSSOCN;" & _
		"Data Source=10.21.160.244, 100;" & _ 
        "Initial Catalog=BRBD;" & _ 
        "User Id=rxuser;" & _ 
        "Password=TeamTest" 
		
dim SQLconnection, myCommand, myConnection
dim extract as String ="SELECT dteDateUploaded FROM tblDriver ORDER BY dteDateUploaded DESC", connect
dim reader As SqlDataReader = _
            command.ExecuteReader ( _
		    CommandBehavior.CloseConnection)
While reader.Read()
      Console.WriteLine(reader.GetSqlValue(1))			
 end while
 
dim dbconn,strSQL
dim rsDriverUpdate
dim dLastUpdate
  	
      rsDriverUpdate = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT dteDateUploaded FROM tblDriver ORDER BY dteDateUploaded DESC;"
rsDriverUpdate.Open (strSQL, dbconn, 3)
dLastUpdate = rsDriverUpdate("dteDateUploaded")
end sub 
 
</script>
 
 
	
 
<html>
<head>
<title>Tech Team</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="imagetoolbar" content="no">
<link rel="stylesheet" href="css/main.css" type="text/css">
<script language="Javascript1.2" src="js/main.js"></script>
</head>
<body onLoad="MM_preloadImages('images/nav1_1hi.png','images/nav1_2hi.png','images/nav1_3hi.png','images/nav1_4hi.png','images/nav2_1hi.png','images/nav2_2hi.png')">
<center>
  <div id="wrapper"> 
    <!-- BEGIN TOP MENU DISPLAY -->
    <div id="upNav"> 
      <div><a href="default.aspx">Home</a></div>
      <div>|</div>
      <div><a href="ftp://patchmgtu.com/" target="_blank">Patch Mgt 
        FTP Site</a></div>
      <div>|</div>
      <div><a href="ftp://atest.com" target="_blank">IRM 
        FTP Site</a></div>
      <div>|</div>
      <div><a href="http://acd.ds.state.htm" target="_blank">DS Web 
        Site</a></div>
      <div>|</div>
      <div><a href='javascript: popUp("SearchTips.aspx")'>Search Tips</a></div>
      <div>|</div>
      <div><a href="contact.aspx">Contact Us</a></div>
      <div>|</div>
      <div><a href="Admin_Logon.aspx">Admin</a></div>
    </div>
    <!-- END TOP MENU DISPLAY -->
    <div id="header"><img src="images/header.png"></div>
    <div id="main"><img src="images/body.jpg"></div>
    <!-- BEGIN LEFT MENU DISPLAY -->
    <div id="menu"> 
      <div><img src="images/nav1_head.png"></div>
      <div><a href="SearchbyDevice.aspx" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('device','','images/nav1_1hi.png',1)"><img src="images/nav1_1lo.png" alt="Search by Device" name="device"></a></div>
      <!--<div><a href="AdvancedSearch.aspx" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('advanced','','images/nav1_3hi.png',1)"><img src="images/nav1_3lo.png" alt="Advanced Search" name="advanced"></a></div>-->
      <div><a href="BrowsebyMachine.aspx" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('browse','','images/nav1_4hi.png',1)"><img src="images/nav1_4lo.png" alt="Browse Machines" name="browse"></a></div>
    </div>
    <!-- END LEFT MENU DISPLAY -->
    <div id="formBack"><img src="images/form3_bg.jpg"></div>
    <div id="driverForm" class="popLong"> <span class="SectionHeader">Welcome!</span> 
      <p>Welcome to the CA Driver Resource Database. You can search for device 
        drivers used on Consular workstations and servers. Please use the links 
        to the left to begin.</p>
      <p>For more information on how to use this site, view the <a href='javascript: popUp("SearchTips.aspx")'>Search 
        Tips</a>.</p>
      <p>The Driver Resource Database site is under construction. We are aware 
        that some functionalties are unavaliable and/or limited. Please bear with 
        us while we make updates.</p>
    </div>
    <div id="footer"><img src="images/footer.png"></div>
    <div id="date" align="right"> 
      <% Response.Write("Database Last Updated " & dLastUpdate & "</div>") %></div>
  </div>
</center>
 
</body>
</html>
[+][-]01/28/09 01:17 PM, ID: 23491422Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625