g i l 1 7 8
New member
CREATE TABLE PROBLEM
זוהי שאלת המשך לשאלה שנשאלה לא מזמן: אני יוצר טבלה חדשה ע"י CREATE TABLE STRING המורץ מתוך SRORED PROCEDURE ע"י VB. הבעיה בגיליתי היא שאני מוגבל עד 21 עמודות! כיצד אני יכול למנוע בעיה זו?(אני חייב את כל 26 העמודות) תודה גיל על כל מקרה הוספתי את הקוד : Dim Table_Name As String Dim strDay As String Dim strMonth As String Dim cmd As ADODB.Command Dim Cnn As ADODB.Connection Set Cnn = New ADODB.Connection Set Cnn = CreateObject("ADODB.Connection") Cnn.ConnectionString = "Provider=SQLOLEDB;DATA SOURCE=galm;initial catalog=tv2day_archive;user id=sa;password=v520r615;" Cnn.Open Set cmd = New ADODB.Command Set cmd.ActiveConnection = Cnn cmd.CommandText = "Test_CreateTable" 'name of SP cmd.CommandType = adCmdStoredProc 'tells the cmd to execute SP cmd.CommandTimeout = 60 'wait max 60 secs and then send error msg. strDay = cmbDate.Text strMonth = cmbMonth.Text If Len(strDay) = 1 Then strDay = "0" & strDay If Len(strMonth) = 1 Then strMonth = "0" & strMonth Table_Name = "Access_tblProgramDetails_Until_" & strDay & "_" & strMonth & "_" & Right(cmbYear.Text, 2) cmd.Parameters.Append cmd.CreateParameter("@Table_Name", adVarChar, adParamInput, 50, Table_Name) cmd.Execute
זוהי שאלת המשך לשאלה שנשאלה לא מזמן: אני יוצר טבלה חדשה ע"י CREATE TABLE STRING המורץ מתוך SRORED PROCEDURE ע"י VB. הבעיה בגיליתי היא שאני מוגבל עד 21 עמודות! כיצד אני יכול למנוע בעיה זו?(אני חייב את כל 26 העמודות) תודה גיל על כל מקרה הוספתי את הקוד : Dim Table_Name As String Dim strDay As String Dim strMonth As String Dim cmd As ADODB.Command Dim Cnn As ADODB.Connection Set Cnn = New ADODB.Connection Set Cnn = CreateObject("ADODB.Connection") Cnn.ConnectionString = "Provider=SQLOLEDB;DATA SOURCE=galm;initial catalog=tv2day_archive;user id=sa;password=v520r615;" Cnn.Open Set cmd = New ADODB.Command Set cmd.ActiveConnection = Cnn cmd.CommandText = "Test_CreateTable" 'name of SP cmd.CommandType = adCmdStoredProc 'tells the cmd to execute SP cmd.CommandTimeout = 60 'wait max 60 secs and then send error msg. strDay = cmbDate.Text strMonth = cmbMonth.Text If Len(strDay) = 1 Then strDay = "0" & strDay If Len(strMonth) = 1 Then strMonth = "0" & strMonth Table_Name = "Access_tblProgramDetails_Until_" & strDay & "_" & strMonth & "_" & Right(cmbYear.Text, 2) cmd.Parameters.Append cmd.CreateParameter("@Table_Name", adVarChar, adParamInput, 50, Table_Name) cmd.Execute