메뉴 바로가기 검색 및 카테고리 바로가기

한빛미디어

뇌를 자극하는 ASP.NET 2.0 프로그래밍

뇌를 자극하는 ASP.NET 2.0 프로그래밍 질의응답 게시판입니다.

asp문에서 vb를 이용 mssql문연동하는건데...ㅠㅠ

2015-04-17

|

by 헉

34213

현재 회사에 asp문에서 vb랑 mssql연동해서 사용하는데요.

이거 소스 분석이 너무 안되서..ㅠㅠ

주석좀 달아주심 정말 감사드리겟습니다..


If Trim(Cust_Name) <> "" OR Trim(Cust_Code) <> "" OR Trim(Cust_FULL_Name) <> "" Then
                    strSQL = "SELECT A.BP_CD,A.BP_TYPE,A.BP_RGST_NO,A.BP_NM,A.BP_FULL_NM,A.ZIP_CD,A.ADDR1,A.ADDR2,A.CONTRY_CD,A.TEL_NO,A.FAX_NO,A.REMARK1,A.E_MAIL,A.REG_NAME,B.c_Name_Kor "
                    strSQL = strSQL & "FROM [dbo].[S_BIZ_PARTNER] A "
                    strSQL = strSQL & "LEFT OUTER JOIN [dbo].[A_User_Master] B ON A.REG_NAME = B.c_User_Id "
                    strSQL = strSQL & "WHERE A.BP_NM Like \%" & Cust_Name & "% AND A.BP_CD like \" & Cust_Code & "% "
                    If Trim(Cust_Name) <> "" Then strSQL = strSQL & "  AND A.BP_NM Like \%" & Cust_Name & "% "
                    If Trim(Cust_Code) <> "" Then strSQL = strSQL & " AND A.BP_CD = \" & Cust_Code & "% "
                    If Trim(Cust_FULL_Name) <> "" Then strSQL = strSQL & " AND A.BP_FULL_NM like \%" & Cust_FULL_Name & "% "
                    strSQL = strSQL & "ORDER BY 2 "
                    Response.Write strSQL

                    Set objDBConn = Server.CreateObject("ADODB.Connection")
                    Set objRs = Server.CreateObject("ADODB.RecordSet")

                    objDBConn.Open "server", "sa", "P@ssw0rd"

                    objRs.Open strSQL, objDBConn

                    If objRs.BOF or objRs.EOF Then
                    Else
                        Do Until objRs.EOF  
                    %>      
                    
                                                     style="border-bottom:dashed; border-color:bisque; border-bottom-width:1px;"
                            onclick="Select_Cust(<%=objRs("BP_CD")%>,<%=objRs("BP_TYPE")%>,<%=objRs("BP_RGST_NO")%>,<%=objRs("BP_NM")%>,<%=objRs("BP_FULL_NM")%>,<%=objRs("ZIP_CD")%>,<%=objRs("ADDR1")%>,<%=objRs("ADDR2")%>,<%=objRs("CONTRY_CD")%>,<%=objRs("TEL_NO")%>,<%=objRs("FAX_NO")%>,<%=objRs("REMARK1")%>,<%=objRs("E_MAIL")%>,<%=objRs("c_Name_Kor")%>);"
                            class="style16">
                            <%=objRs("BP_CD")%>
                        
                                                     style="border-bottom:dashed; border-color:bisque; border-bottom-width:1px;"
                            
                            
                            onclick="Select_Cust(<%=objRs("BP_CD")%>,<%=objRs("BP_TYPE")%>,<%=objRs("BP_RGST_NO")%>,<%=objRs("BP_NM")%>,<%=objRs("BP_FULL_NM")%>,<%=objRs("ZIP_CD")%>,<%=objRs("ADDR1")%>,<%=objRs("ADDR2")%>,<%=objRs("CONTRY_CD")%>,<%=objRs("TEL_NO")%>,<%=objRs("FAX_NO")%>,<%=objRs("REMARK1")%>,<%=objRs("E_MAIL")%>,<%=objRs("c_Name_Kor")%>);"
                            class="style18">
                            <%=objRs("BP_NM")%>
                        
                                                     style="border-bottom:dashed; border-color:bisque; border-bottom-width:1px;"
                            
                            onclick="Select_Cust(<%=objRs("BP_CD")%>,<%=objRs("BP_TYPE")%>,<%=objRs("BP_RGST_NO")%>,<%=objRs("BP_NM")%>,<%=objRs("BP_FULL_NM")%>,<%=objRs("ZIP_CD")%>,<%=objRs("ADDR1")%>,<%=objRs("ADDR2")%>,<%=objRs("CONTRY_CD")%>,<%=objRs("TEL_NO")%>,<%=objRs("FAX_NO")%>,<%=objRs("REMARK1")%>,<%=objRs("E_MAIL")%>,<%=objRs("c_Name_Kor")%>);"
                            class="style11">
                            <%=objRs("BP_FULL_NM")%>
                        
                        
                      
                    <%
                            objRs.MoveNext
                        Loop
                    End If

                    objRs.Close
                    Set objRs = nothing
                    objDBConn.Close
                    Set objDBConn = nothing
                Else
                    %>
댓글 입력
자료실