Hi,
I am trying to establish connectivity to SAP HANA database from asp.net page. I am using the below code.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
private void UploadButton_Click(object sender, EventArgs e) { HanaConnection conn = new HanaConnection( "Server=hana-db:30015;UserID=JSmith;Password=secret"); try { conn.Open(); conn.Close(); } catch (HanaException ex) { MessageBox.Show(ex.Errors[0].Source + " : " + ex.Errors[0].Message + " (" + ex.Errors[0].NativeError.ToString() + ")", "Failed to connect"); } }
</script>
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <asp:FileUpload id="FileUploadControl" runat="server" /> <asp:Button runat="server" id="UploadButton" text="Upload" onclick="UploadButton_Click" /> <br /><br /> <asp:Label runat="server" id="StatusLabel" text="Upload status: " />
</form>
</body>
</html>
when I run this page, I get the the below error:
Compiler Error Message: CS0246: The type or namespace name 'HanaConnection' could not be found (are you missing a using directive or an assembly reference?)
Can any one who has done SAP connectivity from asp.net page help me on to do the connectivity ?
Request clarification before answering.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.