|
I agree with Graus, this is the good method. Since inserting huge file into db makes it huge and will overhead to administrative perspective.
In sql2005 it is not possible to insert videos. In SQL2008 (COde Name:katmai) has these facilities.
Vidhya Sagar
|
|
|
|
|
Hi,
I am using SQL Server 2005 and I have a column of type decimal. Default it adds decimal(18, 0). My value that I will have will be 9.99. How would I change decimal(18, 0) to accommodate this?
Please can someone help??
Thanks
|
|
|
|
|
decimal(18,2) specifies a column that can hold values with 18 decimal digits in total, including 2 decimal digits to the right of the decimal point.
Paul Marfleet
|
|
|
|
|
str+="CREATE TABLE ";
str+=m_TableName;
str+="(ID INTEGER,FangWei TEXT,FuYang TEXT,QingXie TEXT)";
try{
m_pConnection->Execute(str.AllocSysString(),&RecordsAffected,adCmdText);
}
when debug to here, the following appear:
Unhandled exception in SerialRecieve.exe(KERNEL32.DLL):0xE06D7363:Microsoft C++ Exception.
str is a CString variable,which is the table name, the program passed the compile and the build, but when debug, it can not go through.
maybe it is a easy problem, but i can not resolve it
help me please!
thanks a lot!
wuhuaiji
|
|
|
|
|
Hi
I want to use bulk insert in order to insert information from a CSV to the database.
The CSV contains fewer fields than the DB.
I don't want to use a format file, I want to specify all the options within the with clause.
I need to map the fields in the CSV to the fields within the Database table.
Thanks,
Clint
|
|
|
|
|
I can't help with that; I use bcp with a format file to load a table defined specifically to accept the bulk-loaded data, then I move the data to the target tables(s).
|
|
|
|
|
I can't help with a bulk insert - however would doing an import via Enterprise Manager be an option?
I mention this because you can map fields through the import wizard and it should cover what you want to do.
Of course this is a once off option for ad-hoc jobs, but if doing a bulk insert is not absolutely necessary and this is an ad-hoc job I'd suggest looking at this option.
In Enterprise Manager it is under Tools/Data Transformation Services/Import Data...
You an also get to this via the SQL Server tab on your start menu under Import and Export Data
Hope this helps...
You always pass failure on the way to success.
|
|
|
|
|
Hi,
I am using Sql server 2005 reporting services. I have created reports on server. I want to connect reportserver from client's PC and the Reports should come with Records as logged in User wise. This I want to place on different panes after calling them, as this happens with Google Analytics and msn sites. To place the records, I will use AJAX controls.
Can any one help me.
With Thanks
|
|
|
|
|
Your question, as it stands, is of too general a nature to be answered. Identify specific problems you require help with and post the questions in the relevent forums.
Paul Marfleet
|
|
|
|
|
I have problem calling reports from client PC, which are generated already and are on server, logged in user wise.
|
|
|
|
|
MSinha wrote: logged in user wise
I don't understand what you mean.
Please post your code. This will make it easier to identify your problem.
Paul Marfleet
|
|
|
|
|
I appreciate the assistance that all of you have provided so far. However, I have encountered a slight glitch with the CreateQueryDef() method. The problem is that it seems to take a while for the QueryDef to be actually created and available for use in the following code.
After I create a QueryDef, I need to use it in the very next subroutine, a point in which it might not actually become available in MS Access. Is there a way to pause execution of the subroutine until the QueryDef is actually created and available for use?
|
|
|
|
|
I've not tried this...
Perhaps something like:
CreateQueryDef("mynewquery",...)
while( notexists( "mynewquery" ) )
doevents
loop
qdf = QueryDefs("mynewquery")
Those are not the right names, but maybe the right idea.
Let us know if you get a solution. I may want to use it myself.
David
|
|
|
|
|
Here is what I did, and interestingly enough...it works.
I created code that essentially does nothing but execute a loop and pass a counter to a control. Then I added a control to the form, left it visible, but essentially hid it from the form by making the textbox's background color, border color, and fore color the exact same as the underlying form color. This provided something for the processor to do while the QueryDef was being created. I essentially needed to count to 10000.
Here is the code:
'Provides time to create QueryDef qryFinalResult
Dim intCount As Integer
intCount = 0
For intCount = 1 To 10000
txtCounter.SetFocus
txtCounter.Text = "Count: " & intCount & "."
intCount = intCount + 1
Next
Does anybody have a more elegant way to do this? This code prevents that error message from coming up indicating that the QueryDef that I had just created does not exist. When I step through the code myself, the processor has enough time to create the QueryDef object, but when I run it as an application, it does not have time to create it in time to use it.
|
|
|
|
|
when my program run, i want to creat a new table, but i do not know if the name is exist.
so, i want to check that if the name can be used or no, but i don't know how to query all the table names
give me a help, please
i am just starting lerning SQL and VC++
thanks a lot
wuhuaiji
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name = 'table_name') CREATE TABLE table_name ( ....
"sysobjects" is the table which contains all objects created
Regards
KP
|
|
|
|
|
IF EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE='BASE TABLE'
AND TABLE_NAME='Student')
SELECT 'Student exists.'
ELSE
SELECT 'Student does not exist.'
-- or
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME='Student'
-- or
SELECT * FROM sysobjects WHERE name='Student'
--OR
IF OBJECT_ID('Student') IS NOT NULL
PRINT 'Student exists.'
ELSE
PRINT 'Student does not exist.'
Never Think That You Have Failed Instead Always Think That u hav Better Chance Next Time...
|
|
|
|
|
Hi,
I created a function to check if a table exists, as I need to check for this sort of thing frequently.
Here is the function code:
<code>
CREATE function dbo.DoesObjectExist(@Name varchar(200), @Type char(1))
returns varchar(7)
begin
declare @Result varchar(7)
if exists (select * from sysobjects
where name = @Name
and xtype = @Type)
select @Result = 'present'
else
select @Result = ''
return @Result
end
This is how you check if the OffVansQtyOrdered table exists using this function:
<code>
if dbo.DoesObjectExist('OffVansQtyOrdered','u') = 'present'
I hope this is of help...
You always pass failure on the way to success.
|
|
|
|
|
firstly thanks again,
by the way,i am so sorry, that i do not really understand what you write above, and i do not know in VC++ , how to create a table, just like the question i write "a problem about m_pConnection->Execute", have you a good way to resolve it, or can can you tell me which problem exist in my program
wuhuaiji
|
|
|
|
|
Hi,
The first example is what is called a "user defined function".
This is a means for SQL to process data based on parameters passed to the function and then return a value(or a table).
In this case the function takes an object and object type as input.
The object type, in the bottom piece of code, is "u" which means that the function only looks for tables.
The advantage of a function is that you can create this code once and reuse it many times by just calling it with dbo.DoesObjectExist('tablename','u').
In terms of creating a SQL table in C++ I'm sorry to say that I cannot help you with that yet as I am learning C# at the moment.
What I can recommend is google and searches with strings such as "create SQL table with C++" and "SQL create table".
As a tool google is invaluable and has proved to be just this in my work - as there is always going to be an example somewhere out there of what you are trying to do.
Good luck.
You always pass failure on the way to success.
|
|
|
|
|
hi every body
i have my project that i have pages that contains grid views then with updating sume page the underlining under page number became hidden and some pages still underline under page number visible what happend and how i can make the pages page underlines visible thx in advance.
let's work together
|
|
|
|
|
how to find the last value in a Table .
My table was designed by another person ..it doesnt have any Identity column ..
It has only EMPname,Empaddress,EmpContactno.
can any one pls tell me how to find the last value in the table
Thanks in advance
Regards
Bino varghese
|
|
|
|
|
you mean to say u want a last record of the Table...is that so...
|
|
|
|
|
if i m getting you correct so let me tell you there is no such way by which u can get the last row of the tabe u shuld be more specific abut ur query..but there is a way by which u can achieve ur task.
select top 1 * from table
order by somefield
Hope it will work for you.
Thanks and regards
Aavesh Agaerwal
|
|
|
|
|
Last value by what criteria?
|
|
|
|