게시판 본문 COM / COM+ by VB 6.0 - Read Only
re: 2003 r2 에서 com+ 등록및 설정에 관해서 |
---|
작성자: 김상윤
작성일시: 2007-04-19 23:20,
조회수: 40,882
|
Option Explicit
Implements ObjectControl Dim adoCn As Connection Public Sub insert(ByVal writer As String, ByVal email As String, _ ByVal subject As String, ByVal contents As String, ByVal pwd As String) Dim adoCmd As Command Dim maxno As Integer On Error GoTo ErrTrap Set adoCmd = New Command With adoCmd .ActiveConnection = adoCn .CommandType = adCmdStoredProc .CommandText = "getmax_pk" .Parameters.Append .CreateParameter("@maxno", adInteger, adParamOutput, 4) .Execute , , adExecuteNoRecords maxno = .Parameters("@maxno") .CommandText = "combbs_insert_sp" .Parameters.delete ("@maxno") .Parameters.Append .CreateParameter("@maxno", adInteger, adParamInput, 4, maxno) .Parameters.Append .CreateParameter("@bbs_writer", adVarChar, adParamInput, 10, writer) .Parameters.Append .CreateParameter("@bbs_email", adVarChar, adParamInput, 60, email) .Parameters.Append .CreateParameter("@bbs_subject", adVarChar, adParamInput, 80, subject) .Parameters.Append .CreateParameter("@bbs_contents", adLongVarChar, adParamInput, LenB(contents), contents) .Parameters.Append .CreateParameter("@pwd", adVarChar, adParamInput, 8, pwd) .Execute , , adExecuteNoRecords End With Set adoCmd = Nothing Exit Sub ErrTrap: If Not adoCmd Is Nothing Then Set adoCmd = Nothing GetObjectContext.SetAbort End Sub Public Sub aninsert(ByVal hire1 As Integer, ByVal hire2 As Integer, _ ByVal hire3 As Integer, ByVal writer As String, _ ByVal email As String, ByVal subject As String, _ ByVal contents As String, ByVal pwd As String) Dim adoCmd As Command Dim maxno As Integer On Error GoTo ErrTrap Set adoCmd = New Command With adoCmd .ActiveConnection = adoCn .CommandType = adCmdStoredProc .CommandText = "getmax_pk" .Parameters.Append .CreateParameter("@maxno", adInteger, adParamOutput, 4) .Execute , , adExecuteNoRecords maxno = .Parameters("@maxno") .CommandText = "combbs_aninsert_sp" .Parameters.delete ("@maxno") .Parameters.Append .CreateParameter("@hire1", adInteger, adParamInput, 4, hire1) .Parameters.Append .CreateParameter("@hire2", adSmallInt, adParamInput, 2, hire2) .Parameters.Append .CreateParameter("@maxno", adInteger, adParamInput, 4, maxno) .Parameters.Append .CreateParameter("@new_hire2", adSmallInt, adParamInput, 2, (hire2 + 1)) .Parameters.Append .CreateParameter("@new_hire3", adSmallInt, adParamInput, 2, (hire3 + 1)) .Parameters.Append .CreateParameter("@bbs_writer", adVarChar, adParamInput, 10, writer) .Parameters.Append .CreateParameter("@bbs_email", adVarChar, adParamInput, 60, email) .Parameters.Append .CreateParameter("@bbs_subject", adVarChar, adParamInput, 80, subject) .Parameters.Append .CreateParameter("@bbs_contets", adLongVarChar, adParamInput, LenB(contents), contents) .Parameters.Append .CreateParameter("@pwd", adVarChar, adParamInput, 8, pwd) .Execute , , adExecuteNoRecords End With Set adoCmd = Nothing GetObjectContext.SetComplete Exit Sub ErrTrap: If Not adoCmd Is Nothing Then Set adoCmd = Nothing GetObjectContext.SetAbort End Sub Private Sub ObjectControl_Activate() Dim stradoCn As String ' 집 컴퓨터 연결자 stradoCn = "Provider=SQLOLEDB.1;Password=????;Persist Security Info=True;" & _ "User ID=??;Initial Catalog=bbs_third;Data Source=????" Set adoCn = New Connection adoCn.Open stradoCn End Sub Private Function ObjectControl_CanBePooled() As Boolean ObjectControl_CanBePooled = True End Function Private Sub ObjectControl_Deactivate() If adoCn.State = adStateOpen Then adoCn.Close If Not adoCn Is Nothing Then Set adoCn = Nothing End Sub 거의 이런소스로 되어 있는 답변형 게시판 소스 입니다. 이것은 일부분이구여 참조는 1. com+ Services type library 2. microdoft active server pages object library 3. microdoft activeX data objects 2.7 library 를 제가 직접 선택했습니다. 그리고 님이 말씀하신 Set obj_combbs = CreateObject("nedu_bbscom.msgadd") MsgBox "OK" Set obj_combbs = Nothing 에 대한 것은 확인을 하였습니다. ok라고 메시지 창이 나오더군여 |
IP 주소: 121.133.38.209
|
전체 276 건의 게시물,
12 페이지로 구성된
COM / COM+ by VB 6.0 게시판의
2 페이지입니다.
게시물 | ||||
---|---|---|---|---|
256 |
정보문 |
2007-08-03 | 1,378 | |
255 | 2007-08-04 | 3,478 | ||
254 |
초짜 |
2007-07-02 | 1,141 | |
253 | 2007-07-03 | 3,428 | ||
252 |
초짜 |
2007-07-03 | 1,128 | |
251 | 2007-07-04 | 3,411 | ||
250 | 2007-06-17 | 3,661 | ||
249 | 2007-06-18 | 3,384 | ||
248 | 2007-06-30 | 3,315 | ||
247 | 2007-07-01 | 3,600 | ||
246 | 2007-04-24 | 3,549 | ||
245 | 2007-04-18 | 10,138 | ||
244 | 2007-04-19 | 3,472 | ||
243 | 2007-04-19 | 3,279 | ||
242 | 2007-04-19 | 5,215 | ||
241 | 2007-04-19 | 3,251 | ||
2007-04-19 | 40,882 | |||
239 | 2007-04-20 | 3,617 | ||
238 | 2007-04-20 | 3,282 | ||
236 | 2007-03-30 | 3,213 | ||
235 | 2007-03-31 | 3,393 | ||
234 | 2007-02-13 | 14,632 | ||
233 | 2007-02-14 | 3,217 | ||
232 |
dawn |
2007-01-04 | 959 | |
231 | 2007-01-04 | 3,231 |