|
If you want to use the User.Identity.Name then you need to either use Windows authentication or Forms Authentication. This really isn't the forum for this, but this[^] or this[^] article might help you.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I fixed an after update trigger with a table in Sql server 2005 and i want to get the last Identity updated in the this table to inserted in another table. How can i get the last updated Identity in a table?
Please help
Thank you
Sms
|
|
|
|
|
Do you mean that you have an Identity column in your table and, following an update, you want to find out he value in this field for the records that were updated? If so, you should look at the values in this field for the rows in the inserted entity in your trigger implementation.
Paul Marfleet
|
|
|
|
|
If you need the identity of the inserted record in the main table, use the scope_identity() function to retrieve the data.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I would appreciate some info regarding how to connect to the currently open database using the CurrentDb connection string. I am not certain of the syntax. Here is what I have so far:
Dim dbsHeadcount As Database
Dim Cnxn As ADODB.Connection
Dim strConn As String
Dim rstInputFile As ADODB.Recordset
Dim cmdSQLInputFile As ADODB.Command
Dim strSQLInputFile As String
Dim rstHyperionMany As ADODB.Recordset
Dim cmdSQLHyperionMany As ADODB.Command
Dim strSQLHyperionMany As String
Dim rstHyperionOne As ADODB.Recordset
Dim cmdSQLHyperionOne As ADODB.Command
Dim strSQLHyperionOne As String
Dim strDBPath As String
Dim strFileName As String
Dim strMessage As String
Set dbsHeadcount = CurrentDb
Set cmdSQLInputFile = New ADODB.Command
Set cmdSQLInputFile.ActiveConnection = CurrentDb.Connection ' IS THIS RIGHT??? IF NOT WHAT IS THE SYNTAX??? :confused::confused::confused:
strSQLInputFile = "SELECT [COUNTRY], [TYPE], [BUSINESS UNIT], " & _
"[L/R/G], [REGION], [JOB FUNCTION], [09/12/2007 Reported] " & _
"[NUMINDEX] FROM [TBLINPUTFILE]"
cmdSQLInputFile.CommandType = adCmdText
cmdSQLInputFile.CommandText = strSQLInputFile
Set rstInputFile = cmdSQLInputFile.Execute()
rstInputFile.MoveFirst
Set cmdSQLHyperionMany = New ADODB.Command
Set cmdSQLHyperionMany.ActiveConnection = CurrentDb.Connection
strSQLHyperionMany = "SELECT [COUNTRY], [TYPE], [BUSINESS UNIT], " & _
"[L/R/G], [REGION], [JOB FUNCTION], [09/12/2007 Reported] " & _
"FROM [tblInputFile]"
cmdSQLHyperionMany.CommandType = adCmdText
cmdSQLHyperionMany.CommandText = strSQLHyperionMany
Set rstHyperionMany = cmdSQLHyperionMany.Execute()
rstHyperionMany.MoveFirst
The problem is how do I connect to the CurrentDb.Connection that is currently active?
|
|
|
|
|
In what context??? In this VBA code in Access?? It looks like it, but we have to be sure.
I think you might be looking for something closer to this:
Dim conn As ADODB.Connection
Dim comm As New ADODB.Command
Dim rs As New ADODB.Recordset
Dim param As ADODB.Parameter
Set conn = Application.CurrentProject.Connection
comm.ActiveConnection = conn
...
|
|
|
|
|
|
By running the sp’s through DTS
the data is collected in a form of excel data file
Now I want the solution so that folder which contains the excel file
Will get copy automatically on the server.
At present we are manuualy copy that folder using FTP
|
|
|
|
|
And this has what to do with SQL or databases??
|
|
|
|
|
DTS has a "File Transfer Protocol Task" (that I think can read a single file at a time) and an "Execute Process Task" (that could be used to run "ftp.exe" with a script file).
For my project, we obtained an FTP ActiveX component and wrote an ActiveX Script task.
|
|
|
|
|
Hi,
I need to solve this asap and Im new to the development world. So someone pls help me on this.
I have a table user_det with fields userid,fname,lname,add. If I need a system generated id, I can use a GUID. But if I need a auto increment id which is defined by me, say User001..then User002..etc, how can I achieve this?
Please let me know asap..Its reallly urgent.
Thanks.
Regards,
Anuradha
|
|
|
|
|
anuradha.rrao wrote: Its reallly urgent.
That is not a polite thing to say around here.
anuradha.rrao wrote: say User001..then User002..etc,
You might be best off having a field called user and the values in the field be integers. Then, from there, you would have the field be an identity field with auto-increment set to how you want to increment the integer. Google Identity for MSSQL for more info.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
HI,
Add a field ID to ur table as an identity column and define seed value as 1 . it will autoincreament by 1 for each row .
alter table test
add id int identity(1,1)
Regards,
Suyash
|
|
|
|
|
Hi
remember that when you create an Identity Column in SQL , you have to Assign a data type. The Identity Function Accept numeric value. if you Pass "User" you will get an Error. "User" is a keyword in SQL.
i suggust you use Numeric like this
http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/19681;pt=19681;uf=0[^]
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi All,
Thanks a ton for your suggestions. I value them. I have tried all of this, but I am not getting the exact result I expected to get. So I am going to try the max function and use excecutescalar on it and increment it and try. If this is wrong. Please let me know.
Regards,
Anuradha
|
|
|
|
|
I am programming an application in C# that will bring in data from an Access Database. For example, I have a table in Access that holds customer information like name, notes and address. I want to bring this into the application during runtime. Could anyone point me to a good tutorial or information on this?
I would greatly appreciate it!
|
|
|
|
|
it depends how much u know currently. if u just woke up in the morning n thought of doing some programming, then don't try at home! just google for it and you'll find good stuff.
|
|
|
|
|
Very little, I rememeber doing some c# and ado.net integration like a year ago for a class. But, now I have this project that is due in a couple months and I am trying to pull in information regarding it : )
Thanks for the link.
|
|
|
|
|
|
Hi ,
Please incorporate below code to use MS Access as ur backend.
connection =
new OdbcConnection("Driver={Microsoft Access Driver (*.mdb)};"+
"DBQ=c:\\program files\\common files\\"+
"borland shared\\data\\dbdemos.mdb");
connection.Open();
dataadapter = new OdbcDataAdapter("select * from customer", connection);
dataset = new DataSet();
dataadapter.Fill(dataset, "table1");
dataGrid1.DataSource = dataset;
dataGrid1.DataMember = "table1";
Regards,
Suyash
|
|
|
|
|
will hi i'm new to programming world but i like competition i'm building a database & i'm connecting it with vb.net the database is fine but every time i had a problem with the connection not just these i want to make a search in the database to delete certain record or row i will send a copy of the DB & my project i really need some answer & if there is any one how can chat with me on the messenger to help me & give him the copy of the DB & the project this is my Email " h_27717@hotmail.com"
thanks for any help
& pest regards
nowdy
|
|
|
|
|
nowdy wrote: this is my Email " h_27717@hotmail.com"
Great way to open yourself to spammers.
nowdy wrote: pest regards
Should be best regards.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
Paul Conrad wrote: Should be best regards.
Are you certain ? :P
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Or if he's trolling, just leave it as "pest regards"
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
Oh thank you & forgive me for my mistakes in the language because the is not my mother tongue i speaks arabic & i'm sure if u will going to speaks my language i'm not going to
Mocke
you Sir
|
|
|
|