 |
 | InfoPath / Access 2003 - VBScript - SQL |  | Wheels012 | 6:01 17 Apr '09 |
|
 |
Good morning all.
I have the following code, but I am coming up with an error in my FROM statement.
Sub CTRL10_7_OnClick(eventObj) ' Submit Button Dim strSQL, MyConn ' Submit the form to add the new record Set MyConn = CreateObject("ADODB.Connection") MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\c9dpr\Desktop\GC100 Backend.mdb" StoreFields XDocument.UI.Alert(Lockbox) 'SQL statement to run apend query strSQL = "" strSQL = strSQL & "INSERT INTO tbl_GC100 (Lockbox, [Cash Deposit Date], [Batch Number])" strSQL = strSQL & " SELECT @Lockbox, @Cash_Deposit_Date, @Batch_Number" strSQL = strSQL & " FROM XDocument.DOM.selectSingleNode('dfs:myFields/dfs:dataFields/d:tbl_GC100')" XDocument.UI.Alert(strSQL)
MyConn.Execute strSQL MyConn.Close
End Sub
Any assistance would be greatly appreciated.
Thank you, WHEELS
|
|
|
|
 |
 | FRM-40200 field is protected against update |  | LordLothar | 1:57 9 Apr '09 |
|
 |
In my oracle form builder, if I set the data block 'Property palette' 'Allow insert' as no.
When I run the form, I cant type anything in the textfield, and that FRM-40200 field is protected against update error is announced at bottom.
If the 'Allow insert' is set to yes. I can do all my stuff (querying, LOV etc) just fine.
I have no problem setting the rest of 'Allow query,update,delete' to yes or no, its just 'Allow insert'. How to solve this or it has to be always yes for 'allow insert' property?
Thanks in advance.
|
|
|
|
 |
|
 |
Hi, The sql below replaces the 'AND' with 'OR'
declare @sql varchar(100) set @sql = 'not "Ireland" AND "london" or "tokyo"'
print replace(@sql, 'AND', 'OR')
This is what I get. Notice that I do NOT want the word Ireland to change as it has and in it
not "irelOR" OR "london" or "tokyo" The result should be: not "ireland" OR "london" or "tokyo"
How can I solve this please? Thanks
|
|
|
|
 |
|
|
 |
|
 |
how to compressed database backup y wavelet transform? 
|
|
|
|
 |
|
 |
hi
i have following query which works in sqlserver 2005 but same query shows the error in my
sql is there any other syntax plz help i working on pivote table and qury run in sql2005 but not in mysql why?
create view myview as
select * from dbo.master1 pivot ( count(EmpName) for EmpSubGrp in (EG3 ,TM5 ,TMA ,TMC ,TM1 ,TM2 ,OP6 ,OP7 ,TMB ) ) as p
|
|
|
|
 |
|
 |
Because the PIVOT-statement is part of TSQL. MySQL doesn't support TSQL-commands AFAIK.
I are troll 
|
|
|
|
 |
|
 |
I m using the below code to set the primary key on the table but it is not working.Can u suggest me something. thank in advance.. alter table Emp modify Emp_Id varchar(100) not null alter table Emp add primary key(Emp_Id )
|
|
|
|
 |
|
 |
1.How can I get initials(first letter only) from name column in my details table..Any idea?
|
|
|
|
 |
 | Total beginner has "can't find user" error |  | Laurent.iss | 9:28 29 Mar '09 |
|
 |
I just installed MySQL 5.1 on Vista I can create and modify a DB from SQL Wave or MySqlAdmin.exe But I cannot make a simple C# connection or change password "cannot find user" Error (2)
 I think that some file is missing such as "etc\passwd" or something like that. I spent hours searching the web...
Code Project guys are the best!
 My user name is root, current password is ""
|
|
|
|
 |
|
 |
Hi There,
I have a report that has [B]Group by [/B] "[B]status[/B]= Funded and Not funded" , "[B]Department[/B]" and "Title"
I need to find the [B]Total amount [/B] that department had earned for different Research Proposals. In One Proposal there could be more that PI and Co-PI
Thank you Bijaya
|
|
|
|
 |
 | Cursor not searching in Tables |  | srihariacha | 1:00 25 Mar '09 |
|
 |
/****** Object: StoredProcedure [dbo].[CheckColumnExist] Script Date: 03/25/2009 12:21:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
ALTER PROC [dbo].[CheckIndexExist] AS DECLARE @TableName VARCHAR(100) DECLARE @ColumnName VARCHAR(100) DECLARE @Object_ID BIT DECLARE @Column_ID BIT DECLARE @ID INT DECLARE @Result INT DECLARE @Count INT
SET NOCOUNT ON
SELECT * INTO #OBJ FROM sys.all_objects SELECT * INTO #COL FROM sys.all_columns SELECT * INTO #IDX FROM sys.index_columns
DECLARE GetTableNColumn CURSOR FOR SELECT ID, Table_Name, Column_Name FROM IndexReport ORDER BY Table_Name, Column_Name
OPEN GetTableNColumn FETCH NEXT FROM GetTableNColumn INTO @ID, @TableName, @ColumnName WHILE @@fetch_status = 0 BEGIN SET @Object_ID = (SELECT count(Object_ID) FROM #OBJ WHERE #OBJ.NAME =@TableName ) SET @Column_ID = (SELECT Column_ID FROM #COL WHERE Object_ID = @Object_ID and NAME = @ColumnName) SET @Count = (SELECT 1 FROM #IDX WHERE object_id = @Object_ID and column_id = @Column_ID)
IF(@Count=1) BEGIN UPDATE IndexReport SET IndexExists=1 where id=@ID END ELSE BEGIN --UPDATE IndexReport SET IndexExists=0 where id=@ID UPDATE IndexReport SET DUMMYT =CONVERT(VARCHAR,@Object_ID) + ' ' + CONVERT(VARCHAR,@Column_ID) where id=@ID END
FETCH NEXT FROM GetTableNColumn INTO @ID,@TableName,@ColumnName END CLOSE GetTableNColumn DEALLOCATE GetTableNColumn
--select * from #obj --select * from #ind --select * from #cal
SET NOCOUNT OFF
|
|
|
|
 |
|
 |
You are in wrong forum. This is MySQL discussion board and your question has nothing to do with that. Try GeneralDatabase forum instead.
|
|
|
|
 |
 | SQLExecute failure |  | Sakthiu | 22:47 23 Mar '09 |
|
 |
When i try to execute SQLStatements, i got below error message. Could any folks please help me out ?.
SQLExecute failed: SQLState:08S01 NativeError:2006 ErrorText:[MySQL][ODBC 3.51 Driver][mysqld-4.1.20]MySQL server has gone away
and then the connection is broken. i have to reconnect to SQLServer for every SQLExecute failure.
Thanks, Sakthi
Nice things do nice works
|
|
|
|
 |
|
 |
Have you tried changing the "wait_timeout" server variable?
|
|
|
|
 |
|
 |
yes i tried. still i see that error.
+sakthi
Nice things do nice works
|
|
|
|
 |
|
 |
This could either be the MySQL Server version issue. Check whether it is 4.1 or above
|
|
|
|
 |
|
 |
Yes. it is mysqld-4.1.20.
Nice things do nice works
|
|
|
|
 |
|
 |
Hi All,
I am using MYSql DB for backend.I have fullfill all the requirment e.g. Dot Net Connector for MYSQL etc.
Now in my application I have seen a different type of bug. One of my project I create a class clsLogin and has a following method
public int AuthenticateUser(boclsLogin objboclsLogin) { int inRes = 0; using (MySqlConnection mySqlCon = new MySqlConnection(ConfigurationManager.ConnectionStrings["MySqlCon"].ConnectionString.ToString())) { string strSQL = "select count(vcUSerId) from Login " + " where vcUserId=@UserId "; " and vcPassword=@Password" + " and vcUserType=@UserType"; MySqlCommand _cmd = new MySqlCommand(strSQL, mySqlCon); _cmd.Parameters.Add("@UserId", MySqlDbType.VarChar).Value = objboclsLogin.UserId; _cmd.Parameters.Add("@Password", MySqlDbType.VarChar).Value = objboclsLogin.Password; _cmd.Parameters.Add("@UserType", MySqlDbType.VarChar).Value = objboclsLogin.UserType; if (mySqlCon.State == ConnectionState.Closed) mySqlCon.Open(); inRes = Convert.ToInt32(_cmd.ExecuteScalar()); mySqlCon.Close(); } return inRes;
}
the above method in native application works fine.But I have need the same class into a another project then i just copy paste the class File into my 2nd application it is return me a 0(scalar value).
But when i pass the hardcoded value into my query then it'll return me the 1.
So i am very phatectic,How I solve this anyone give me idea.
thanks in advance
Deepak  Smile a Lots,Its Costs Nothing
|
|
|
|
 |
|
 |
hi I saved an image in MY SQL database with visual basic.net , but I cant retrieve it I dont have a retrieve code.. can any one help me? pleeeeease 
|
|
|
|
 |
|
 |
One can retrieve image data from BLOB filed just by using Select statement 
|
|
|
|
 |
 | Roll back to the previous state |  | jishbalan | 7:59 18 Mar '09 |
|
 |
Hello Friends,
I am in trouble while loading data to SQL Server. i am using bulkcopy code to load datas.
I dont have much knowledge with SQL If error occurs, the loading may not complete(ie i having four tables to be loaded. error may occur while loading the fourth table. for me its like corrupting the table
So if error occurs i want to roll back to last state. The code i used is With these code can i use rollback property ?? Please do help Public Function rb_BCP(ByVal Server As String, ByVal Database As String, _ ByVal Table As String, ByVal FileName As String) Dim objServer As SQLDMO.SQLServer Dim objBCP As SQLDMO.BulkCopy Dim objDB As SQLDMO.Database On Error GoTo ErrorHandler Set objServer = New SQLDMO.SQLServer Set objBCP = New SQLDMO.BulkCopy
objServer.LoginSecure = True objServer.EnableBcp = True objServer.QuotedIdentifier = True objServer.Connect (Server)
Set objDB = objServer.Databases(Database) With objBCP .UseExistingConnection = True .DataFilePath = FileName .RowDelimiter = vbCrLf .IncludeIdentityValues = True .ServerBCPKeepNulls = True .DataFileType = SQLDMODataFile_SpecialDelimitedChar .ColumnDelimiter = "|" .IncludeIdentityValues = True .ImportRowsPerBatch = 1000000 'Below speeds things up 'but does not log the bulk copy operation 'comment out if this is not what you .UseBulkCopyOption = True End With objDB.Tables(Table).ImportData objBCP Set objBCP = Nothing objServer.Disconnect Set objServer = Nothing Exit Function ErrorHandler: MsgBox "Error " & Err.Number & vbCrLf & Err.Description End Function
jishith
|
|
|
|
 |
|
 |
This forum holds all about MySQL which is different from SQL Server, Access and many others handled in the Database forum.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
 |
|
 |
I'm kind of learning Sql but i have problems with understanding how to use SQL in web development.
|
|
|
|
 |
|
 |
Hi,
I have created a report with three input parameters(OrdNum,InvoiceNum,PO), and i checked AllowBlankValue to allow blank input values. Any One of the input parameter must be given to get the order details. When i give the input for PO, i need to have a combination of one more input parameter(either OrderNum,InvoiceNum) along with PO. So i want to give a message like (Give one more input along with PO) when i give the value for PO alone, i mean i need to validate this input in the report itself. Is it possible?
ex:
IF (PO<>'' AND InvoiceNum='' AND OrdNum='') THEN "MSG: Give one more input along with PO"
As of now i have given the above condition in the Stored procedure. It ll return Null rows. I have given the message in the NoRows property of table. I dont want let it go to the stored procedure and check that condition. I want to do it in the report itself. Please help me!
|
|
|
|
 |