Need help

Discussion in 'ASP.NET / ASP.NET Core' started by chimera, Mar 30, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. A friend of mine made me a web page he hosted on his server. He took his server down sent me the pages.. I sent up an account at discountasp.net and uploaded my pages It does not work I get a DB error line 55 message. unable to connect to sql DB. I have copied the line 55 from dream weave when I open the page there this is it..

    Connection.Open "Provider=sqloledb;Data Source=IP_ADDR_HERE,1433;Network Library=DBMSSOCN;Initial Catalog=Bridge;User ID=admin;Password=admin;"

    what do i need to change in this code to make it work on discountasp.net ?
     
  2. ok this is gonna be long but i was asked to post this here for help.. 2 problems but it's basicly the same thing.. i can not get an app to connect to mysql DB and I can't get my web pages to connect as well.

    1. this is the error message i get from my ASP site..




    Microsoft OLE DB Provider for SQL Server error '80004005'


    [DBNETLIB][ConnectionOpen (Connect()).]Specified SQL server not found.


    /dedkp/index.asp, line 55


    this is the script from my page and i will make line 55 bold.


    <%@ LANGUAGE="VBScript" %>
    <%
    Option Explicit


    Function GetClass(n)
    Select Case N
    Case 1
    GetClass="Bard"
    Case 2
    GetClass="Beastlord"
    Case 3
    GetClass="Cleric"
    Case 4
    GetClass="Druid"
    Case 5
    GetClass="Enchanter"
    Case 6
    GetClass="Magician"
    Case 7
    GetClass="Monk"
    Case 8
    GetClass="Necromancer"
    Case 9
    GetClass="Paladin"
    Case 10
    GetClass="Ranger"
    Case 11
    GetClass="Rogue"
    Case 12
    GetClass="Shadow Knight"
    Case 13
    GetClass="Shaman"
    Case 14
    GetClass="Warrior"
    Case 15
    GetClass="Wizard"
    case 16
    GetClass="Berserker"
    End Select
    End Function


    Dim Connection
    Dim RS
    Dim SQLStmt
    Dim SortBy
    Dim ClickOver


    SortBy = Request.QueryString("SortBy")
    ClickOver=1


    if trim(SortBy) = "" then SortBy = "Name"


    Set Connection = Server.CreateObject("ADODB.Connection")


    Connection.Open "Provider=sqloledb;Data Source=IP_ADDR_HERE,1433;Network Library=DBMSSOCN;Initial Catalog=Bridge;User ID=admin;Password=admin;"


    SQLStmt="SELECT Name, Class, Level, DKP, ID from DERoster where Level > 54 order by " &amp; SortBy


    Set RS = Connection.Execute(SQLStmt)
    %>
    <html>


    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>DKP Totals for Destiny's End</title>
    <link rel="stylesheet" href="bridge.css" type="text/css" />
    </head>





    <p><font face="Lucida Sans" size="2" color="#FFFFFF">DKP Totals for Destiny's End on Druzzil Ro</font></p>




    <p align="right"><font face="Lucida Sans" size="1" color="#FFFFFF">Click DKP amount to view Raid
    Detail</font></p>
    </blockquote>
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber1" bgcolor="#000000">
    <tr>
    <td width="20%" bgcolor="#808080"> </td>
    <td width="20%" bgcolor="#808080"><font face="Lucida Sans"><a href="index.asp?SortBy=Name">Character</a></font></td>
    <td width="20%" bgcolor="#808080"><font face="Lucida Sans"><a href="index.asp?SortBy=Level">Level</a></font></td>
    <td width="20%" bgcolor="#808080"><font face="Lucida Sans"><a href="index.asp?SortBy=Class">Class</a></font></td>
    <td width="20%" bgcolor="#808080"><font face="Lucida Sans"><a href="index.asp?SortBy=DKP">DKP Total</a></font></td>
    </tr>
    <tr>
    <td width="100%" colspan="5">&amp;nbsp;</td>
    </tr>


    <%Do While Not RS.EOF%>


    <font face="Lucida Sans" size=10>
    <tr>
    <td width="20%"> </td>
    <td width="20%"><%= RS.Fields("Name") %> </td>
    <td width="20%"><%= RS.Fields("Level") %> </td>
    <td width="20%"><%= GetClass(RS.Fields("Class")) %> </td>
    <td width="20%"><a href="raid.asp?num=<%=RS.Fields("ID")%>"><%= RS.Fields("DKP") %></a></td>
    </tr>
    </font>


    <% RS.MoveNext
    ClickOver = ClickOver + 1
    if ClickOver = 6 then %>
    <tr>
    <td width="100%" colspan="5"><hr></td>
    </tr>
    <%ClickOver = 1


    End If
    Loop %>


    </table>
    </blockquote>
    <hr>
    <p align="right"><font face="Lucida Sans" size="2" color="#00FFFF">Powered by
    LazDKP, 0.1
    If you want it, x-server tell druzzil.Lazirith
    If you can't find me online, you don't play enough EQ to need a DKP program</font></p>


    </body>


    </html>


    this ends the 1st of 3 pages didn't want you to fall asleep here so only posted 1.


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    now as you see the first page was done in asp with VB script. the app made also will not connect to mysql DB this is the error I get there...


    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.


    ************** Exception Text **************
    System.Data.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (Connect()).]Specified SQL server not found.
    at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
    at System.Data.OleDb.OleDbConnection.InitializeProvider()
    at System.Data.OleDb.OleDbConnection.Open()
    at LazDKP.Module1.InitDB() in C:\Documents and Settings\Glen murphey\Desktop\DEdkp\Admin\LazDKP\Module1.vb:line 36
    at LazDKP.Form1.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Glen murphey\Desktop\DEdkp\Admin\LazDKP\Form1.vb:line 154
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message&amp; m)
    at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)
    at System.Windows.Forms.Button.WndProc(Message&amp; m)
    at System.Windows.Forms.ControlNativeWindow.OnMessage(Message&amp; m)
    at System.Windows.Forms.ControlNativeWindow.WndProc(Message&amp; m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
    ----------------------------------------
    LazDKP
    Assembly Version: 1.0.1915.2021
    Win32 Version: 1.0.1915.2021
    CodeBase: file:///C:/Documents%20and%20Settings/Glen%20murphey/Desktop/DEdkp/Admin/LazDKP/bin/LazDKP.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
    ----------------------------------------
    System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
    ----------------------------------------
    System.Data
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
    ----------------------------------------
    Microsoft.VisualBasic
    Assembly Version: 7.0.5000.0
    Win32 Version: 7.10.3052.4
    CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
    ----------------------------------------


    ************** JIT Debugging **************
    To enable just in time (JIT) debugging, the config file for this
    application or machine (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.


    For example:


    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>


    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the machine
    rather than being handled by this dialog.


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    that was the error details of the app. this is the module code of the app.


    Module Module1


    Public dbcon As OleDb.OleDbConnection


    Public dbcmd As OleDb.OleDbCommand


    Public dbreader As OleDb.OleDbDataReader


    Public dbds As New DataSet()


    'Declares


    Public Declare Sub Sleep Lib "kernel32" (ByVal dw As Long)


    'Globals


    Public g_sSelected As String


    Public g_name As String, g_acc As Integer


    Public g_agent As Integer


    'Consts


    Public Const ACC_NOACC = 0 'Disabled


    Public Const ACC_TRAINEE = 1 'Can print and view, but not add/update


    Public Const ACC_BROKER = 2 'Normal access


    Public Const ACC_HEIDE = 3 'Semi-Administrative


    Public Const ACC_ADMIN = 4 'Administrative


    Public Const ACC_GOD = 5 'Me


    Public Const NOTIFY_LISTING = 3 'Who to tell about new listings


    Public Const NOTIFY_STATUS = 4 'Who to send status reports to


    Public Sub FirstInitDB()


    dbcon = New OleDb.OleDbConnection()


    End Sub


    Public Sub InitDB()


    On Error Resume Next


    If dbcon.State = ConnectionState.Open Then Exit Sub


    On Error GoTo 0


    dbcon = New OleDb.OleDbConnection()


    dbcon.ConnectionString = "Provider=sqloledb;Data Source=IP_ADDR_HERE,1433;Network Library=DBMSSOCN;Initial Catalog=Bridge;User ID=admin;Password=admin;"


    dbcon.Open()


    Exit Sub


    er:


    MsgBox("Could not connect to database. Please verify your internet connection. If this problem persists, contact Dan Larsen", vbInformation + vbOKOnly, "Error")


    End Sub


    Public Sub DeInitDB()


    'dbcon.Close()


    End Sub


    Public Function FormatCash(ByVal s As String) As String


    Dim s1 As String, s2 As String


    Dim lop As Integer


    Dim nDec As Integer


    nDec = -1


    s = Trim(s)


    For lop = 1 To Len(s)


    Select Case Mid(s, lop, 1)


    Case "1" To "9"


    If nDec <> -1 Then nDec = nDec + 1


    s1 = s1 &amp; Mid(s, lop, 1)


    Case "0"


    If nDec <> -1 Then nDec = nDec + 1


    s1 = s1 &amp; Mid(s, lop, 1)


    Case "."


    nDec = 0


    Case Else


    'Nada


    End Select


    Next


    If LCase(Right(s, 1)) = "k" Then


    s1 = s1 &amp; "000"


    End If


    If LCase(Right(s, 1)) = "m" Then


    s1 = s1 &amp; "000000"


    End If


    If nDec <> -1 Then


    s1 = Mid(s1, 1, Len(s1) - nDec)


    End If


    s2 = Format(CLng(s1), "$#,##0;($#,##0)")


    FormatCash = s2


    End Function


    Public Function DoSQLNoRet(ByVal query As String) As Integer


    On Error GoTo er


    If dbcon.State <> ConnectionState.Open Then


    DoSQLNoRet = 0


    Exit Function


    End If


    On Error Resume Next


    If Not dbreader.IsClosed Then dbreader.Close()


    On Error GoTo er


    dbcmd = dbcon.CreateCommand


    dbcmd.CommandText = query


    DoSQLNoRet = dbcmd.ExecuteNonQuery()


    Exit Function


    er:


    MsgBox("There has been an error. Please contact Dan Larsen ([email protected])", vbExclamation + vbOKOnly, "Error")


    FileOpen(2, "C:\DEError.log", OpenMode.Append, OpenAccess.Default)


    Print(2, "Error in DoSQLNoRet - " &amp; Err.Description)


    FileClose(2)


    End Function


    Public Function DoSQL(ByVal query As String) As Boolean


    On Error GoTo er


    If dbcon.State <> ConnectionState.Open Then


    DoSQL = False


    Exit Function


    End If


    dbcmd = dbcon.CreateCommand


    dbcmd.CommandText = query


    On Error Resume Next


    If Not dbreader.IsClosed Then dbreader.Close()


    On Error GoTo er


    dbreader = dbcmd.ExecuteReader()


    DoSQL = dbreader.Read


    Exit Function


    er:


    MsgBox("There has been an error. Please contact Dan Larsen ([email protected])", vbExclamation + vbOKOnly, "Error")


    FileOpen(2, "C:\DEError.log", OpenMode.Append, OpenAccess.Default)


    Print(2, "[" &amp; Now &amp; "] Error in DoSQL - " &amp; Err.Description &amp; vbCrLf)


    FileClose(2)


    End Function


    Public Function IncRecord() As Boolean


    IncRecord = dbreader.Read()


    End Function


    Public Function GetValue(ByVal index As Integer) As Object


    On Error GoTo er


    If dbreader.IsDBNull(index) Then


    GetValue = ""


    Else


    GetValue = dbreader.GetValue(index)


    End If


    Exit Function


    er:


    GetValue = ""


    End Function


    Public Function GetValueN(ByVal index As Integer) As Object


    On Error GoTo er


    If dbreader.IsDBNull(index) Then


    GetValueN = 0


    Else


    GetValueN = dbreader.GetValue(index)


    End If


    Exit Function


    er:


    GetValueN = "0"


    End Function





    Public Function ProcessString(ByVal s As String) As String


    ProcessString = Replace(s, "'", "''")


    End Function


    End Module


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    No idea what to do to fix these things.. the friend that has helped me by making this is now to busy to help me work the bugs out.. he says simply change the ip make it look at the discountasp.net mysql Im completly lost.[​IMG]
     
  3. Bruce

    Bruce DiscountASP.NET Staff

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page